Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Cannot find FacesContext

843842Apr 30 2003 — edited May 1 2003
Hi, Any help would be deeply appreciated.
I am trying to run code I've written to test jsf on Tomcat 4.0.4 and am getting the following runtime error when I deploy to the test environment. I get this error message even when I try to run the examples supplied with the EA3 version of JSF.
The web.xml file appears like below
<servlet>
<servlet-name>Faces Servlet</servlet-name>
<servlet-class>
javax.faces.webapp.FacesServlet
</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>Faces Servlet</servlet-name>
<url-pattern>/faces/*.jsp</url-pattern>
</servlet-mapping>

<taglib>
<taglib-uri>http://java.sun.com/jsf/core</taglib-uri>
<taglib-location>/WEB-INF/tlds/jsf_core.tld</taglib-location>
</taglib>

<taglib>
<taglib-uri>http://java.sun.com/jsf/html</taglib-uri>
<taglib-location>/WEB-INF/tlds/html_basic.tld</taglib-location>
</taglib>
The jsp page is (that I have copied) :
<HTML>
<HEAD> <title>Hello</title> </HEAD>
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
<body bgcolor="white">
<h:graphic_image id="wave_img" url="/wave.med.gif" />
<f:use_faces>
<h:form id="responseform" formName="responseform">
<h2>Hi, <h:output_text id="userLabel"
modelReference="UserNameBean.userName" /> </h2>
<h:command_button id="back" label="Back"
commandName="back" /><p>
</h:form>
</f:use_faces>
</HTML>

I have copied all the jar file under WEB-INF/lib directory.
What is the problem
Thanks.
Alessandro.

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on May 29 2003
Added on Apr 30 2003
1 comment
118 views