I'm using Mojarra 2.2 on Tomcat 8 and Eclipse 4.4.1 (Build id: 20140925-1800) without any additional plugins and no Maven.
Everything works fine, but in last few days I have the following problem:
I start Tomcat, can navigate and submit data, etc, everything works correct. Now if I change my Java code, then Tomcat republishes as usual, but if I try to refresh the page in browser via F5, then I get the following error:
HTTP Status 503 - Servlet Faces Servlet is currently unavailable
In Eclipse console the following appears:
Apr 27, 2015 5:18:27 PM org.apache.catalina.core.ApplicationDispatcher invoke
WARNUNG: Servlet Faces Servlet is currently unavailable
Now I have to restart Tomcat after every little change in Java source code in order to solve it.
I don't know since when I have this issue, but I am sure I haven't it before. I changed many things in the project, but I cannot figure out the cause of this problem.
Here's a snippet of my web.xml
:
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" id="WebApp_ID" version="3.0">
.....
.....
<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>/ps/*</url-pattern>
</servlet-mapping>
<context-param>
<description>State saving method: 'client' or 'server' (=default). See JSF Specification 2.5.2</description>
<param-name>javax.faces.STATE_SAVING_METHOD</param-name>
<param-value>client</param-value>
</context-param>
<context-param>
<param-name>javax.servlet.jsp.jstl.fmt.localizationContext</param-name>
<param-value>resources.application</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>facelets.DEVELOPMENT</param-name>
<param-value>true</param-value>
</context-param>
<context-param>
<param-name>javax.faces.FACELETS_REFRESH_PERIOD</param-name>
<param-value>0</param-value>
</context-param>
<context-param>
<param-name>javax.faces.PROJECT_STAGE</param-name>
<param-value>Development</param-value>
</context-param>
<context-param>
<param-name>javax.faces.CONFIG_FILES</param-name>
<param-value>/WEB-INF/faces-config.xml,/WEB-INF/navigations.xml</param-value>
</context-param>
....
<listener>
<listener-class>com.sun.faces.config.ConfigureListener</listener-class>
</listener>
....
<security-constraint>
<display-name>Restrict XHTML Documents</display-name>
<web-resource-collection>
<web-resource-name>XHTML</web-resource-name>
<url-pattern>*.xhtml</url-pattern>
</web-resource-collection>
</security-constraint>
<session-config>
<session-timeout>60</session-timeout>
<tracking-mode>COOKIE</tracking-mode>
</session-config>
<error-page>
<exception-type>javax.faces.application.ViewExpiredException</exception-type>
<location>/index.jsp</location>
</error-page>
<locale-encoding-mapping-list>
<locale-encoding-mapping>
<locale>de</locale>
<encoding>UTF-8</encoding>
</locale-encoding-mapping>
</locale-encoding-mapping-list>
</web-app>
How is this caused and how can I solve it?