Skip to main content

facesContext not resolved at runtime

6 replies [Last post]
sbouchard
Offline
Joined: 2010-05-21

Hi,

I am currently reading the book JSF in Action, and I have a problem with one example.

Here's the code:

When I execute the .JSP, everything JSF related works fine (taglib, validator, navigation) except the image button that is not displayed.
When I look to the HTML source code, I can clearly see that the EL part was not resolved:

I've try to replace facecontext... with request.contextPath, but same result.
It seems that everything starting with # is just passing through.

Am I missing something?

Environment:
apache-tomcat-6.0.26
jakarta-taglibs-standard-1.1.2
mojarra-1.2_08-FCS

Thanks a lot
Sylvain

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Jason Lee

On 5/21/10 8:05 AM, webtier@javadesktop.org wrote:
> Hi,
>
> I am currently reading the book JSF in Action, and I have a problem with one example.
>
> Here's the code:
>
> > image="#{facesContext.externalContext.requestContextPath}/images/submit.gif"/>
>
> When I execute the .JSP, everything JSF related works fine (taglib, validator, navigation) except the image button that is not displayed.
> When I look to the HTML source code, I can clearly see that the EL part was not resolved:
>
>
>
> I've try to replace facecontext... with request.contextPath, but same result.
> It seems that everything starting with # is just passing through.
>
> Am I missing something?
>
> Environment:
> apache-tomcat-6.0.26
> jakarta-taglibs-standard-1.1.2
> mojarra-1.2_08-FCS
>
That certainly doesn't look right. The docs say that image is a
ValueExpression, so it should be evaluated. Could you update Mojarra to
the latest (1.2_14, or, if you can, 2.0.2) and try again? If it still
fails, it may be an implementation bug.

Thanks.

--
Jason Lee
Senior Member of Technical Staff
GlassFish Administration Console

Oracle Corporation
Phone x31197/+1 405-343-1964
Blog http://blogs.steeplesoft.com

---------------------------------------------------------------------
To unsubscribe, e-mail: webtier-unsubscribe@glassfish.dev.java.net
For additional commands, e-mail: webtier-help@glassfish.dev.java.net

sbouchard
Offline
Joined: 2010-05-21

Hi Jason,

Thank you for your time!

I've followed your instruction and tried with 1.2_14 and 2.0.2. But, unfortunately for me, I still got the problem. I guess it must be something with my JSF configuration. I just can't put my finger on it.

I'm just beginning learning JSF, and maybe I miss a step in my configuration. Besides having a face-config.xml, the web.xml config (Servlet) and having the jstl jar files available, is there something else to do?

Sylvain

sbouchard
Offline
Joined: 2010-05-21

Hi Jason,

I just found what the problem was. The culprit was Eclipse Project Facets configuration.
I use Eclipse WebTools (Galileo) to create my project. The Facets was setup like this: Dynamic Web module: 2.4, Java 1.4, JavaServers Faces 1.1. I try to modify these settings to at least work with JSF 1.2... Can't figured out how to modify it, Eclipse complain about a zillion things. So, I created a new web project using web module 2.5 and Java 6 and NO jsf facets.

That was it! Everything was running fine!

I don't fully understand why. Surely at runtime eclipse didn't handle well the fact that the project was setup with JSF 1.1 and in my web content library was JSF 1.2.

Someone have a better explanation?

Sylvain

Jason Lee

I'm glad you figured it out! I really don't have even a guess at an
explanation beyond my usual distaste for Eclipse (NetBeans and IDEA have
better JSF support, IME). But, you're working, so that's the important
thing.

Good luck! :)

On 5/21/10 9:56 AM, webtier@javadesktop.org wrote:
> Hi Jason,
>
> I just found what the problem was. The culprit was Eclipse Project Facets configuration.
> I use Eclipse WebTools (Galileo) to create my project. The Facets was setup like this: Dynamic Web module: 2.4, Java 1.4, JavaServers Faces 1.1. I try to modify these settings to at least work with JSF 1.2... Can't figured out how to modify it, Eclipse complain about a zillion things. So, I created a new web project using web module 2.5 and Java 6 and NO jsf facets.
>
> That was it! Everything was running fine!
>
> I don't fully understand why. Surely at runtime eclipse didn't handle well the fact that the project was setup with JSF 1.1 and in my web content library was JSF 1.2.
>
> Someone have a better explanation?
>
> Sylvain
> [Message sent by forum member 'sbouchard']
>
> http://forums.java.net/jive/thread.jspa?messageID=470888
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: webtier-unsubscribe@glassfish.dev.java.net
> For additional commands, e-mail: webtier-help@glassfish.dev.java.net
>
>

--
Jason Lee
Senior Member of Technical Staff
GlassFish Administration Console

Oracle Corporation
Phone x31197/+1 405-343-1964
Blog http://blogs.steeplesoft.com

---------------------------------------------------------------------
To unsubscribe, e-mail: webtier-unsubscribe@glassfish.dev.java.net
For additional commands, e-mail: webtier-help@glassfish.dev.java.net

sbouchard
Offline
Joined: 2010-05-21

Hi Jason,

Unfortunately, at work, I'm stuck with Eclipse but will definitely gives a shot to NetBeans at home !

Thanks for the tips !

Sylvain

Judy Herilla

Im in an urgent bind right now with Eclipse and Glassfish v3.
If anyone has time, i can try to scrape together some $ for your time.

Judy

--
Judy Herilla
Energetic Educator and Technology Enabler
Tel: 412.353.9463

Technology Consulting: www.Karmoxie.com
Wine Events and Toys: www.GrapeThoughts.com

Contact Me [image: Linkedin] [image:
Twitter]

--- @ WiseStamp
Signature.
Get it now
On Fri, May 21, 2010 at 11:11 AM, wrote:

> Hi Jason,
>
> Unfortunately, at work, I'm stuck with Eclipse but will definitely gives a
> shot to NetBeans at home !
>
> Thanks for the tips !
>
> Sylvain
> [Message sent by forum member 'sbouchard']
>
> http://forums.java.net/jive/thread.jspa?messageID=470901
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: webtier-unsubscribe@glassfish.dev.java.net
> For additional commands, e-mail: webtier-help@glassfish.dev.java.net
>
>
[att1.html]