aspose file tools*
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 EJB 3 in Action this week in the EJB and other Java EE Technologies 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
 
wood burning stoves
 
subject: Server is throwing 500 internal server error caused by Stack overflow!
 
Similar Threads
JBoss, Tomahawk, Stack Overflow.
JSTL EL language not resolving
Apache + Tomcat + JSF? ***newbee
Hello World Programme is not Running
Strange expression problem