This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes JSF and the fly likes ..jsp extension JSF web.xml Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "..jsp extension JSF web.xml" Watch "..jsp extension JSF web.xml" New topic
Author

..jsp extension JSF web.xml

Rishi Kanth
Ranch Hand

Joined: May 23, 2006
Posts: 43
Hello,

I am novice to JSF application. I am using Eclipse(3.3), Tomcat(6.0) and Myfaces for my application. I have successfully deployed the application using tomcat. My question is: this is the part of web.xml which works fine

<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>*.jsf</url-pattern>
</servlet-mapping>

when is enter the following URL http://localhost:8080/careerMask/index.jsf it gives me the output.

My question is . If I configure the web.xml for .jsp extensions,I get a whole lot bunch of exception ( the stack trace wont end). Who can I map *.jsp to the Face Servlet. Actually, is it possible to map .jsp files to Faces Servlet. Please let me know the problem or any other relevant information.

Thanks,
Rishi
Christophe Verré
Sheriff

Joined: Nov 24, 2005
Posts: 14687
    
  16

Is it a StackOverflowError ? By default, JSF redirects your requests to a view whose extension is ".jsp". So if you map Faces Servlet to all jsp extension, I guess that it will keep on forwarding to the same view again and again.


[My Blog]
All roads lead to JavaRanch
 
wood burning stoves
 
subject: ..jsp extension JSF web.xml