Hello everyone
I am rather new to
jsf and I have run into a big black hole ;-)
After I have deployed my app. and I call my bankUI.jsp through my jsf mapping I get the following error:
javax.servlet.jsp.JspException: Cannot find FacesContext
javax.faces.webapp.UIComponentTag.doStartTag(UIComponentTag.java:405)
org.apache.myfaces.taglib.core.ViewTag.doStartTag(ViewTag.java:71)
... rest of stacktrace .... This is my setup:
App.server: jboss-4.0.4RC1
web.xml: <!-- Faces
Servlet -->
<servlet>
<servlet-name>Faces Servlet</servlet-name>
<servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<!-- Faces Servlet Mapping -->
<servlet-mapping>
<servlet-name>Faces Servlet</servlet-name>
<url-pattern>*.jsf</url-pattern>
</servlet-mapping>
web-client.war (struture) bankUI.jsp
meta-inf
manifest.mf
web-inf
faces-config.xml
web.xml
classes
...sourcefiles...
lib
commons-beanutils.jar
commons-collections.jar
commons-digester.jar
commons-logging.jar
jsf-api.jar
jsf-impl.jar
jstl.jar
standard.jar
bankUI.jsp: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<title>
jboss_tutorial
</title>
<head> </head>
<body>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
<f:view>
<h:form id="form">
<h
utputText id="overskrift" value="Ralph�s Bank" style="font-family:Arial, sans-serif; font-size=24;color=green"/>
<h
utputLabel for="cprsoeg">
<h
utputText id="cprsoegtext" value="Soeg cprnr."/>
</h
utputLabel>
<h:inputText id="cprsoeg" value="#{bankUIBean.cprnr}" required="true">
<f:validateLongRange minimum="10" maximum="10"/>
</h:inputText>
<h:message id="errors" for="cprsoeg" style="color:red" />
</h:form>
</f:view>
</body>
</html>
There are no errors on deployment, and my app. runs find. But when i try to acces my bankUI.jsp i get the error above.
And I do go through the correct jsf mapping
http://localhost:8080/project_1app/bankUI.jsf Now if I remove all my jsf related tags from my
jsp file (bankUI.jsp) the page is displayed correct. So the error occurs when i hit the first jsf tag on my jsp page.
I also run ejb3.0 on my
jboss app server. I don't know if that is usefull information.
PLEASE HELP
Ralph Michelsen