dcsimg
cannot forward to jsf page from jsp and unable to resolve jsf tag
2 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Srinivas_K
Posted On:   Monday, April 14, 2008 09:37 PM

My JSF 'userLogin' starting page am a beginner to JSF , I am getting the following error when I try to invoke using the following URL http://localhost:8080/Loginjsf/ I have copied web.xml,faces-config.xml,index.jsp, userLogin.jsp and also the list of jars I am using. java version I am using jdk1.5.0_14 tomcat version 5.5.25 JSF Version 1.1_01 --------------------------this is the error--------------- exception org.apache.jasper.JasperException: Exception in JSP: /index.jsp:7 4: 5: 6: 7: 8: Stacktrace: org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:451)    More>>
My JSF 'userLogin' starting page

am a beginner to JSF , I am getting the following error when I try to invoke using the following URL

http://localhost:8080/Loginjsf/

I have copied web.xml,faces-config.xml,index.jsp, userLogin.jsp and also the list of jars I am using.
java version I am using jdk1.5.0_14
tomcat version 5.5.25
JSF Version 1.1_01


--------------------------this is the error---------------


exception

org.apache.jasper.JasperException: Exception in JSP: /index.jsp:7

4:
5:
6:
7:
8:

Stacktrace:
org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:451)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:355)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:329)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)


root cause

org.apache.jasper.JasperException: Exception in JSP: /userLogin.jsp:15

12:
13:
14:
15:
16:
17:
18:


Stacktrace:
org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:451)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:355)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:329)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
org.apache.jasper.runtime.PageContextImpl.doForward(PageContextImpl.java:686)
org.apache.jasper.runtime.PageContextImpl.forward(PageContextImpl.java:656)
org.apache.jsp.index_jsp._jspService(index_jsp.java:50)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:98)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:331)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:329)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)


root cause

javax.servlet.ServletException: Cannot find FacesContext
org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:841)
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:774)
org.apache.jsp.userLogin_jsp._jspService(userLogin_jsp.java:92)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:98)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:331)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:329)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
org.apache.jasper.runtime.PageContextImpl.doForward(PageContextImpl.java:686)
org.apache.jasper.runtime.PageContextImpl.forward(PageContextImpl.java:656)
org.apache.jsp.index_jsp._jspService(index_jsp.java:50)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:98)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:331)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:329)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)


root cause

javax.servlet.jsp.JspException: Cannot find FacesContext
javax.faces.webapp.UIComponentTag.doStartTag(UIComponentTag.java:399)
com.sun.faces.taglib.jsf_core.ViewTag.doStartTag(ViewTag.java:105)
org.apache.jsp.userLogin_jsp._jspx_meth_f_005fview_005f0(userLogin_jsp.java:107)
org.apache.jsp.userLogin_jsp._jspService(userLogin_jsp.java:82)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:98)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:331)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:329)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
org.apache.jasper.runtime.PageContextImpl.doForward(PageContextImpl.java:686)
org.apache.jasper.runtime.PageContextImpl.forward(PageContextImpl.java:656)
org.apache.jsp.index_jsp._jspService(index_jsp.java:50)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:98)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:331)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:329)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)





------------------------------------------------------------

THE WEB.XML FILE I AM USING IS


The web.xml, faces-config.xml files which I am using ,
<?xml version='1.0' encoding='UTF-8'?>



javax.faces.CONFIG_FILES
/WEB-INF/faces-config.xml


javax.faces.DEFAULT_SUFFIX
.xhtml


com.sun.faces.validateXml
true

Set this flag to true if you want the JavaServer Faces
Reference Implementation to validate the XML in your
faces-config.xml resources against the DTD. Default
value is false.



Faces Servlet
javax.faces.webapp.FacesServlet
1


Faces Servlet
*.faces


index.jsp



com.sun.faces.config.ConfigureListener





------------------------------------------------------------


THE FACES-CONFIG.XML I AM USING


<?xml version="1.0" encoding="UTF-8"?>




com.sun.facelets.FaceletViewHandler


UserBean
com.demo.bean.UserBean
session

userName
java.lang.String



password
java.lang.String




/userLogin.jsp
failure

/loginForm.jsp



success
/userLoginSuccess.jsp


/userLoginSuccess.jsp


/loginForm.jsp






--------------------------------------------------------


THE INDEX.JSP I AM USING


<%@ page contentType="text/html;charset=UTF-8" language="java" %>










--------------------------------------------------------

THE USERLOGIN.JSP is



<%@ page language="java" pageEncoding="ISO-8859-1"%>
<%@ taglib uri="/WEB-INF/html_basic.tld" prefix="h"%>
<%@ taglib uri="/WEB-INF/jsf_core.tld" prefix="f"%>






















--------------------------------------------------------


THE JAR FILES LOCATED AT tomcat-5.5webappsLoginjsfWEB-INFlib


commons-beanutils.jar
commons-collections.jar
commons-digester.jar
commons-logging.jar
el-api.jar
el-ri.jar
jsf-api.jar
jsf-facelets.jar
jsf-impl.jar
jstl.jar
standard.jar


can any one help me in solving this issue?

   <<Less

Re: cannot forward to jsf page from jsp and unable to resolve jsf tag

Posted By:   Anonymous  
Posted On:   Tuesday, April 29, 2008 05:15 AM

Check out for more information at http://www.ninthcafe.com/int/JSF.html

Re: cannot forward to jsf page from jsp and unable to resolve jsf tag

Posted By:   Anonymous  
Posted On:   Tuesday, April 15, 2008 02:47 AM

in your index.jsp : use instead of userLogin.jsp
Like that you will pass through the Faces Servlet and the following JSP file will be faces-aware
About | Sitemap | Contact