This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
We don't have a whole lot of rules here at the JavaRanch, but one we do insist on is that you use a real name. I know that there's a good chance someone's already using a name like "Amit Gupta", but could you try and come up with something a little more professional-looking? Thanks!
JSF can only managed by the FacesServlet. That means that in your web.xml file, you need to have defined an instance of the FacesServelt and set up a URL mapping to route the JSF page requests to it. The routing part is essential, because unlike a lot of the old-time desktop frameworks, JSF isn't in continuous control of the application - you can mix JSF, plain old JSP, Struts and custom servlets all in the same app.
Customer surveys are for companies who didn't pay proper attention to begin with.
Joined: Jun 26, 2009
I have done all the configuration in both web.xml and faces-config.xml. Below code for web.xml:
Jasper is the JSP compiler. Your exception was thrown because the JSP tag processors generated a reference to the FacesContext object, but that object only gets created when the page was processed by the FacesServlet. It gets created and destroyed for each HTTP request.
Your URL pattern only routes URLs ending with ".faces". So to route properly, your URL would have to be /jsp/data.faces . This would cause the URL to get routed to the FacesServlet, which would then decode it, replacing the ".faces" with ".jsp" and process your faces.jsp page properly.