- This topic has 1 reply, 2 voices, and was last updated 17 years ago by Riyad Kalla.
-
AuthorPosts
-
amersohail794MemberI create a web project in myeclipse 6. Then i added capabilities of JSF + ICEfaces. Then I created a new web page with JSP (Advanced Template) and choosed ICEFaces JSP page. Then i deployed it to jboss 4.2.2 through MyEclipse. It gave me following error, when i access that page:
org.apache.jasper.JasperException: An exception occurred processing JSP page /MyJsp.jsp at line 118: <link rel=”stylesheet” type=”text/css” href=”./xmlhttp/css/xp/xp.css” />
9: </head>
10: <body>
11: <f:view>
12:
13: <ice:outputText value=”Thank you for using ICEfaces.” />
14:Stacktrace:
org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:504)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:415)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:336)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)root cause
java.lang.RuntimeException: Cannot find FacesContext
javax.faces.webapp.UIComponentClassicTagBase.getFacesContext(UIComponentClassicTagBase.java:1796)
javax.faces.webapp.UIComponentClassicTagBase.setJspId(UIComponentClassicTagBase.java:1613)
org.apache.jsp.MyJsp_jsp._jspx_meth_f_005fview_005f0(MyJsp_jsp.java:103)
org.apache.jsp.MyJsp_jsp._jspService(MyJsp_jsp.java:77)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:373)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:336)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
Riyad KallaMemberYou need to access your page using whatever mapping you gave to JSF in your web.xml file so JSF can process the page.
So for example, let’s say you mapped Faces Servlet to *.faces, that means you cannot load MyJsp.jsp, you have to load MyJsp.faces, then JSF will process the page and show it to you. When you use MyJsp.jsp, JSF never gets a chance to process the page, so when the JSF tags try and run, they go “hey, what the heck… I don’t have any of the information I need”, and almost always spit out the “FacesContext not found” error you are seeing as the first sign of a wrong URL.
-
AuthorPosts