Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

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

Vish Joshi
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

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

my jsf page is-


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
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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-name>Faces Servlet</servlet-name>

and in your browser you request this:


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

It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!