This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes JSF and the fly likes Server is throwing 500 internal server error caused by Stack overflow! Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "Server is throwing 500 internal server error caused by Stack overflow! " Watch "Server is throwing 500 internal server error caused by Stack overflow! " New topic
Author

Server is throwing 500 internal server error caused by Stack overflow!

Vish Joshi
Greenhorn

Joined: Dec 22, 2010
Posts: 16

I am making a simple JSF application with no special components-

my jsf page is-
HelloWorld.jsp


web.xml


When is run HelloWorld.jsp the server shows the following error-


I have reduced this application to almost zero to track the error so I am not using any faces-config.xml and backing beans!!
I think the error is in jars what i suppose?
currently i am using three jars jsf-api,jsf-impl and jstl 1.2!
Jay Sartoris
Greenhorn

Joined: Aug 23, 2012
Posts: 1
I know the original posting is almost a year old, but I thought I would reply to try to help anyone else stumbling upon this post.

Based on the configuration, I think the issue here is that you are mapping your Faces Servlet to a "*.jsp" request.

The typical standard mapping for the Faces Servlet is either "*.jsf" or "/faces/*". Really you can use anything you want...but I think *.jsp will actually cause problems.
The way JSF works is during the processing of the request, it will remove remove the section of the url that mapped to the Faces Servlet and add on the default extension (if it was an extension mapping).

For example, if you had a mapping like this:

<servlet-mapping>
<servlet-name>Faces Servlet</servlet-name>
<url-pattern>*.jsf</url-pattern>
</servlet-mapping>

and in your browser you request this:

localhost:9080/myapp/testpage.jsf

As you know the .jsf will route the request to the Faces Servlet, then JSF request processing lifecycle will take over.
In doing so, JSF will remove the Faces Servlet mapping of .jsf and add in the default extension of .jsp, which will be the actual real physical file on disk (e.g. testpage.jsp).

Therefore, I think if you have your Faces Servlet mapped to a url of *.jsp, the JSF code may get in a loop scenario because it keeps calling the Faces Servlet and will eventually lead to a StackOverflowError.

So, the solution to try first would be to change your url mapping to something other than *.jsp

Regards,
Jay
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Server is throwing 500 internal server error caused by Stack overflow!
 
Similar Threads
Apache + Tomcat + JSF? ***newbee
Strange expression problem
JSTL EL language not resolving
Hello World Programme is not Running
JBoss, Tomahawk, Stack Overflow.