File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
Vish Joshi
Greenhorn
Posts: 16
  • 0
  • 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-
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
Posts: 1
  • 0
  • 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-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
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic