webtier@glassfish.java.net

facesContext not resolved at runtime

From: <webtier_at_javadesktop.org>
Date: Fri, 21 May 2010 06:05:17 PDT

Hi,

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

Here's the code:

<h:commandButton action="success"
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:

<input type="image" src="#{request.contextPath}/images/submit.gif" name="j_id_jsp_163829233_2:j_id_jsp_163829233_13" />

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
[Message sent by forum member 'sbouchard']

http://forums.java.net/jive/thread.jspa?messageID=470875