Page 1 of 1

500 Server Error with Resource Servlet

Posted: 07 Sep 2010, 21:14
by fatmabetul
When I configured Resource Servlet in web.xml and deployed it to Google App Engine, I got a Server Error
I followed the instructions and I am not running in a Servlet 3.0 environment

Here is my web.xml;

Code: Select all

<?xml version="1.0" encoding="utf-8"?>
<web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee"
 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
 <description>Template JSF 2.0 application configured to run on the Google AppEngine for Java.</description>
 <display-name>Wildstar Technologies, LLC. Google AppEngine JSF 2.0 Template</display-name>
 <context-param>
  <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
  <param-value>server</param-value>
 </context-param>
 <context-param>
  <param-name>javax.faces.DEFAULT_SUFFIX</param-name>
  <param-value>.xhtml</param-value>
 </context-param>
 <context-param>
  <param-name>com.sun.faces.expressionFactory</param-name>
  <param-value>com.sun.el.ExpressionFactoryImpl</param-value>
 </context-param>
 <context-param>
  <description>
          Set this flag to true if you want the JavaServer Faces
          Reference Implementation to validate the XML in your
          faces-config.xml resources against the DTD. Default
          value is false.
        </description>
  <param-name>com.sun.faces.validateXml</param-name>
  <param-value>true</param-value>
 </context-param>

 <context-param>
  <description>
          When enabled, the runtime initialization and default ResourceHandler
          implementation will use threads to perform their functions. Set this 
          value to false if threads aren't desired (as in the case of running 
          within the Google Application Engine).

          Note that when this option is disabled, the ResourceHandler will not 
          pick up new versions of resources when ProjectStage is development.
        </description>
  <param-name>com.sun.faces.enableThreading</param-name>
  <param-value>false</param-value>
 </context-param>
 <context-param>
  <param-name>com.sun.faces.allowTextChildren</param-name>
  <param-value>true</param-value>
 </context-param>

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

 <servlet>
	<servlet-name>Resource Servlet</servlet-name>
	<servlet-class>
		org.primefaces.resource.ResourceServlet
	</servlet-class>
 </servlet>

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

 <session-config>
  <session-timeout>30</session-timeout>
 </session-config>
 <welcome-file-list>
  <welcome-file>index.jsp</welcome-file>
  <welcome-file>index.xhtml</welcome-file>
  <welcome-file>index.html</welcome-file>
 </welcome-file-list>
 <login-config>
  <auth-method>BASIC</auth-method>
 </login-config>
</web-app>

Re: 500 Server Error with Resource Servlet

Posted: 07 Sep 2010, 21:58
by cagatay.civici
And the error you get is?

Re: 500 Server Error with Resource Servlet

Posted: 07 Sep 2010, 22:45
by fatmabetul
The problem is google app engine does not provide anything useful in the dashboard logs or give any clear problem statement
After I deploy my application with Resource Servlet configured in web.xml, I got this error in my page

Error: Server Error
The server encountered an error and could not complete your request.

If the problem persists, please report your problem and mention this error message and the query that caused it.

But, without Resource Servlet it was working fine.
I suppose the problem is with app engine, if there is nothing wrong with my web.xml
Sorry to bother

Re: 500 Server Error with Resource Servlet

Posted: 07 Sep 2010, 23:43
by cagatay.civici