exception after server restart: javax.servlet.ServletExcepti
infinity2heaven Jun 11, 2009 10:49 AMThis is a critical blocker for us since the last two months of development, and now that we're going into productionWe get this exception at random (one out of ten 10 times, after a server restart). We tried to search every forum we get, but couldn't get one satisfying answer. Is this a common problem with a4j?
It occurs even if you close the browser and open it.
Interestingly, the problem "goes away" after waiting for a period of time, and several tomcat restarts, no idea why. (Session timeout is set to 20 mins)
The technology stack we use:
Apache myfaces 1.2.6
Richfaces 3.3
Apache Orchestra 1.3.1
hibernat 3.4
Spring 2.5.6
Tomahawk 1.1.8
and we use JSF State saving method.
Any help would be greatly appreciated!
ACT_PRS_REBIJECT_DEVICE2009-06-11 10:02:37,600 ERROR [TP-Processor1:] org.ajax4jsf.webapp.BaseXMLFilter - Exception in the filter chain javax.servlet.ServletException: Undefined component type javax.faces.ViewRoot at javax.faces.webapp._ErrorPageWriter.throwException(_ErrorPageWriter.java:546) at javax.faces.webapp.FacesServlet.handleLifecycleException(FacesServlet.java:266) at javax.faces.webapp.FacesServlet.service(FacesServlet.java:160) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:178) at org.ajax4jsf.webapp.BaseFilter.handleRequest(BaseFilter.java:290) at org.ajax4jsf.webapp.BaseFilter.processUploadsAndHandleRequest(BaseFilter.java:390) at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:517) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(ExtensionsFilter.java:246) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at xxx.web.filter.RequestDumper.doFilter(RequestDumper.java:97) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at xxx.web.filter.ErrorLogger.doFilter(ErrorLogger.java:26) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.springframework.security.util.FilterChainProxy.doFilter(FilterChainProxy.java:169) at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:236) at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:167) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(ExtensionsFilter.java:301) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286) at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:190) at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:283) at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:767) at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:697) at org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:889) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:690) at java.lang.Thread.run(Thread.java:619) Caused by: javax.faces.FacesException: Undefined component type javax.faces.ViewRoot at org.apache.myfaces.application.ApplicationImpl.createComponent(ApplicationImpl.java:653) at org.apache.myfaces.application.jsp.JspViewHandlerImpl.createView(JspViewHandlerImpl.java:227) at org.apache.myfaces.lifecycle.RestoreViewExecutor.execute(RestoreViewExecutor.java:99) at org.apache.myfaces.lifecycle.LifecycleImpl.executePhase(LifecycleImpl.java:103) at org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:76) at javax.faces.webapp.FacesServlet.service(FacesServlet.java:151) ... 38 more
web.xml is here
<?xml version="1.0" encoding="UTF-8"?>
<web-app
xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
version="2.5"
xsi:schemaLocation="
http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
<!-- -->
<!-- Spring configuration -->
<!-- -->
<context-param>
<description>
Comma separated list of Spring context configuration files.
</description>
<param-name>contextConfigLocation</param-name>
<param-value>
/WEB-INF/spring/spring-core.xml,
/WEB-INF/spring/spring-security.xml,
/WEB-INF/spring/spring-data.xml,
/WEB-INF/spring/spring-orchestra.xml,
/WEB-INF/spring/spring-mail.xml,
/WEB-INF/spring/spring-integration.xml
</param-value>
</context-param>
<!-- -->
<!-- JSF standard configuration -->
<!-- -->
<context-param>
<description>
Comma-delimited list of context-relative resource
paths under which the JSF implementation will look for application configuration
resources (see Section 10.4.3 "Application Configuration Resource Format" of
JSF 1.2 specification ), before loading a configuration resource named
"/WEB-INF/faces-config.xml" (if such a resource exists).
</description>
<param-name>javax.faces.CONFIG_FILES</param-name>
<param-value>
/WEB-INF/faces/faces-app.xml,
/WEB-INF/faces/faces-web-nav.xml
</param-value>
</context-param>
<context-param>
<description>
The default suffix for extension-mapped resources that contain JSF components.
If not specified, the default value ".jsp" must be used.
</description>
<param-name>javax.faces.DEFAULT_SUFFIX</param-name>
<param-value>.jspx</param-value>
</context-param>
<!--
<context-param>
<description>
Lifecycle identifier of the Lifecycle instance to be used when processing
JSF requests for this web application. If not specified, the JSF default
instance, identified by LifecycleFactory.DEFAULT_LIFECYCLE, must be used.
</description>
<param-name>javax.faces.LIFECYCLE_ID</param-name>
<param-value></param-value>
</context-param>
-->
<context-param>
<description>
The location where state information is saved. Valid values are "server"
(typically saved in HttpSession) and "client" (typically saved as
a hidden field in the subsequent form submit). If not specified,
the default value "server" must be used.
</description>
<param-name>javax.faces.STATE_SAVING_METHOD</param-name>
<param-value>server</param-value>
</context-param>
<!-- -->
<!-- Apache MyFaces configuration -->
<!-- -->
<context-param>
<description>
Enables error handling by the framework. This must be disabled (false)
in order for the Servlet descriptor "error-page" tags (in this file)
to function. Setting it to true will enable verbose error pages for
development.
</description>
<param-name>org.apache.myfaces.ERROR_HANDLING</param-name>
<param-value>false</param-value>
</context-param>
<context-param>
<description>
Only applicable if state saving method is "server" (= default).
Defines the amount (default = 20) of the latest views are stored in session.
</description>
<param-name>org.apache.myfaces.NUMBER_OF_VIEWS_IN_SESSION</param-name>
<param-value>20</param-value>
</context-param>
<context-param>
<description>
Only applicable if state saving method is "server" (= default).
If true (default) the state will be serialized to a byte stream before it is
written to the session. If false the state will not be serialized to
a byte stream.
</description>
<param-name>org.apache.myfaces.SERIALIZE_STATE_IN_SESSION</param-name>
<param-value>true</param-value>
</context-param>
<context-param>
<description>
Only applicable if state saving method is "server" (= default) and if
org.apache.myfaces.SERIALIZE_STATE_IN_SESSION is true (= default) If true (default)
the serialized state will be compressed before it is written to the session.
If false the state will not be compressed.
</description>
<param-name>org.apache.myfaces.COMPRESS_STATE_IN_SESSION</param-name>
<param-value>true</param-value>
</context-param>
<context-param>
<description>
</description>
<param-name>org.apache.myfaces.COMPRESS_STATE_IN_CLIENT</param-name>
<param-value>false</param-value>
</context-param>
<context-param>
<description>
Enables encryption for MyFaces state saving mechanism (server or client). This is
used by org.apache.myfaces.shared_impl.util.StateUtils and is referenced by the
RichFaces state management framework.
</description>
<param-name>org.apache.myfaces.USE_ENCRYPTION</param-name>
<param-value>false</param-value>
</context-param>
<!--
<context-param>
<description>
Private key for the DES algorithm used by the MyFaces encryption mechanism.
</description>
<param-name>org.apache.myfaces.SECRET</param-name>
<param-value>Nz21NDYOMTA=</param-value>
</context-param>
-->
<context-param>
<description>
This parameter tells MyFaces if javascript code should be allowed in the rendered
HTML output. If javascript is allowed, command_link anchors will have javascript
code that submits the corresponding form. If javascript is not allowed, the state
saving info and nested parameters will be added as url parameters.
Default: "true"
</description>
<param-name>org.apache.myfaces.ALLOW_JAVASCRIPT</param-name>
<param-value>true</param-value>
</context-param>
<context-param>
<param-name>org.apache.myfaces.DETECT_JAVASCRIPT</param-name>
<param-value>false</param-value>
</context-param>
<context-param>
<description>
If true, rendered HTML code will be formatted, so that it is "human readable". i.e.
additional line separators and whitespace will be written, that do not influence
the HTML code. Default: "true"
</description>
<param-name>org.apache.myfaces.PRETTY_HTML</param-name>
<param-value>true</param-value>
</context-param>
<context-param>
<description>
If true, a javascript function will be rendered that is able to restore the
former vertical scroll on every request. Convenient feature if you have
pages with long lists and you do not want the browser page to always jump
to the top if you trigger a link or button action that stays on the same page.
Default: "false"
</description>
<param-name>org.apache.myfaces.AUTO_SCROLL</param-name>
<param-value>false</param-value>
</context-param>
<context-param>
<description>
Validate managed beans, navigation rules and ensure that forms are not nested.
</description>
<param-name>org.apache.myfaces.VALIDATE</param-name>
<param-value>true</param-value>
</context-param>
<context-param>
<description>
A class implementing the org.apache.myfaces.shared.renderkit.html.util.AddResource
interface. It is responsible to place scripts and css on the right position in your
HTML document. Default: "org.apache.myfaces.shared.renderkit.html.util.DefaultAddResource"
Follow the description on the MyFaces-Wiki-Performance page to enable StreamingAddResource
instead of DefaultAddResource if you want to gain performance.
</description>
<param-name>org.apache.myfaces.ADD_RESOURCE_CLASS</param-name>
<param-value>org.apache.myfaces.renderkit.html.util.DefaultAddResource</param-value>
<!-- param-value>org.apache.myfaces.renderkit.html.util.NonBufferingAddResource</param-value-->
<!-- param-value>org.apache.myfaces.component.html.util.StreamingAddResource</param-value-->
</context-param>
<context-param>
<description>
A very common problem in configuring MyFaces-web-applications is that the Extensions-Filter
is not configured at all or improperly configured. This parameter will check for a properly
configured Extensions-Filter if it is needed by the web-app. In most cases this check will
work just fine, there might be cases where an internal forward will bypass the
Extensions-Filter and the check will not work. If this is the case, you can disable the
check by setting this parameter to false.
</description>
<param-name>org.apache.myfaces.CHECK_EXTENSIONS_FILTER</param-name>
<param-value>true</param-value>
</context-param>
<!--
<context-param>
<description>
Change the url-pattern from the ExtensionsFilter Default is "/faces/myFacesExtensionResource"
Note: The filter-mapping for ExtensionsFilter, the url-pattern is this value + "/*",
else there comes a exception
</description>
<param-name>org.apache.myfaces.RESOURCE_VIRTUAL_PATH</param-name>
<param-value>/faces/extensionResource</param-value>
</context-param>
-->
<!-- -->
<!-- Apache MyFaces extensions validator configuration -->
<!-- -->
<context-param>
<param-name>org.apache.myfaces.extensions.validator.CUSTOM_MESSAGE_BUNDLE</param-name>
<param-value>xxx.resources.lang.validation</param-value>
</context-param>
<context-param>
<param-name>org.apache.myfaces.extensions.validator.JPA_VALIDATION_ERROR_MESSAGES</param-name>
<param-value>xxx.resources.lang.validation</param-value>
</context-param>
<!-- -->
<!-- Apache MyFaces sandbox configuration -->
<!-- -->
<context-param>
<description>
The RedirectTrackerManager is a component from the MyFaces Sandbox
project. It - allows redirect to be used in navigation rules without
the normal limitations. - JSF apps often use the pattern that one bean
handles a postback, then stores some - data in request scope and
navigates via an internal forward to a new view which - then uses that
data. However doing an internal forward does not update the web -
browser's displayed url. Marking the nagivation as a redirect will
update the - browser url, but all request-scoped data is lost. The
RedirectTracker temporarily - stores request-scoped data in the
session then reattaches it to the following - request, allowing
redirects to be used with request-scoped data. JSF error messages -
(FacesMessage objects) are also in request scope (attached to a
request-scoped - FacesContext object), so redirecting also loses
messages assigned by the previous - view. - - This examples app only
needs to preserve messages, not request-scoped-data, across -
redirects so just that functionality of the RedirectTrackerManager is
enabled here.
org.apache.myfaces.custom.redirectTracker.policy.FullRedirectTrackPolicy
captures the locale, request scoped beans, messages
org.apache.myfaces.custom.redirectTracker.policy.MessagesRedirectTrackPolicy
captures messages only
org.apache.myfaces.custom.redirectTracker.policy.NoopRedirectTrackPolicy
captures nothing - default setting
</description>
<param-name>org.apache.myfaces.redirectTracker.POLICY</param-name>
<param-value>org.apache.myfaces.custom.redirectTracker.policy.FullRedirectTrackPolicy</param-value>
</context-param>
<context-param>
<param-name>org.apache.myfaces.redirectTracker.MAX_REDIRECTS</param-name>
<param-value>20</param-value>
</context-param>
<!-- -->
<!-- Facelets configuration -->
<!-- -->
<context-param>
<description>
A semicolon (;) delimitted list of paths to Facelet tag libraries, relative to
your application's root. These libraries will be loaded when the first request
hits the FaceletViewHandler for page compilation.
Example: /WEB-INF/facelets/foo.taglib.xml; /WEB-INF/facelets/bar.taglib.xml
</description>
<param-name>facelets.LIBRARIES</param-name>
<param-value>/tags/app.taglib.xml;</param-value>
</context-param>
<!--
<context-param>
<description>
A semicolon (;) delimitted list of class names of type com.sun.facelets.tag.TagDecorator,
with a no-argument constructor. These decorators will be loaded when the first request
hits the FaceletViewHandler for page compilation.
Example: com.sun.facelets.tag.jsf.html.HtmlDecorator
</description>
<param-name>facelets.DECORATORS</param-name>
<param-value></param-value>
</context-param>
-->
<context-param>
<description>
Setting this to true will cause the FaceletViewHandler to print out debug information
in an easy to use screen when an error occurs during the rendering process.
Example: true
</description>
<param-name>facelets.DEVELOPMENT</param-name>
<param-value>false</param-value>
</context-param>
<context-param>
<description>
The buffer size to set on the response when the ResponseWriter is generated.
By default the value is -1, which will not assign a buffer size on the response.
This should be increased if you are using development mode in order to guarantee
that the response isn't partially rendered when an error is generated.
Example: 8192
</description>
<param-name>facelets.BUFFER_SIZE</param-name>
<param-value>-1</param-value>
</context-param>
<context-param>
<description>
When a page is requested, what interval in seconds should the compiler check for changes.
If you don't want the compiler to check for changes once the page is compiled, then use
a value of -1. Setting a low refresh period helps during development to be able to edit
pages in a running application.
Example: -1
</description>
<param-name>facelets.REFRESH_PERIOD</param-name>
<param-value>2</param-value>
</context-param>
<!--
<context-param>
<description>
Optionally provide an alternate ResourceResolver that will replace the default logic
of allowing the FacesContext resolve the resource URL.
Example: my.company.IDEResourceResolver
</description>
<param-name>facelets.RESOURCE_RESOLVER</param-name>
<param-value>com.sun.facelets.impl.DefaultResourceResolver</param-value>
</context-param>
-->
<!--
<context-param>
<description>
A semicolon (;) delimitted list of resources that Facelets should use. If no resource
paths are specified, Facelets will handle all requests (DEFAULT). If one or more
paths are specified, Facelets will only use the ones specified, otherwise fall back
on the parent or default ViewHandler (JSP). Note, this requires the FacesServlet
in your web.xml to be mapped with a prefix for capturing multiple file types ex: /faces/*.
Example: /demos/*; *.xhtml
</description>
<param-name>facelets.VIEW_MAPPINGS</param-name>
<param-value></param-value>
</context-param>
-->
<context-param>
<description>
A boolean value that tells the compiler to skip comments (default is true). Even if you
comment out code in your page, the tags will not be compiled but expressions (EL)
will be treated as if they were inlined-- still compiled and evaluated for output in the
document. Skipping comments will remove all comments completely from the document.
Example: false
</description>
<param-name>facelets.SKIP_COMMENTS</param-name>
<!-- This needs to be false in order for CSS includes to function correctly. -->
<param-value>false</param-value>
</context-param>
<!-- -->
<!-- RichFaces configuration -->
<!-- -->
<context-param>
<description>
Is a name of a skin used in an application. It can be a literal string with a skin name,
or the EL expression (#{...}) pointed to a String property (skin name) or a
property of a org.richfaces.framework.skin type. Skin in last case, this instance
is used as a current skin.
</description>
<param-name>org.richfaces.SKIN</param-name>
<param-value>DEFAULT</param-value>
</context-param>
<context-param>
<description>
Defines how the RichFaces script files are loaded to application. Possible values
are: ALL, DEFAULT, NONE. For more information see "Scripts and Styles Load Strategy".
</description>
<param-name>org.richfaces.LoadScriptStrategy</param-name>
<param-value>DEFAULT</param-value>
</context-param>
<context-param>
<description>
Defines how the RichFaces style files are loaded to application. Possible values
are: ALL, DEFAULT, NONE. For more information see "Scripts and Styles Load Strategy".
</description>
<param-name>org.richfaces.LoadStyleStrategy</param-name>
<param-value>DEFAULT</param-value>
</context-param>
<!--
<context-param>
<description>
Is an URL to an application or a container log file (if possible). If this parameter
is set, content from the given URL is shown on a Debug error page in the iframe window.
</description>
<param-name>org.ajax4jsf.LOGFILE</param-name>
<param-value></param-value>
</context-param>
-->
<context-param>
<description>
Is a comma-separated list of custom ViewHandler instances for inserting in chain.
Handlers are inserted BEFORE RichFaces viewhandlers in the given order. For example,
in facelets application this parameter must contain com.sun.facelets.FaceletViewHandler,
instead of declaration in faces-config.xml
</description>
<param-name>org.ajax4jsf.VIEW_HANDLERS</param-name>
<param-value>com.sun.facelets.FaceletViewHandler</param-value>
</context-param>
<!--
<context-param>
<description>
Is a comma-separated list of names for a component as a special control case,
such as messages bundle loader, alias bean components, etc. Is a type of component
got by a reflection from the static field COMPONENT_TYPE . For components with
such types encode methods always are called in rendering Ajax responses, even
if a component isn't in an updated part.
</description>
<param-name>org.ajax4jsf.CONTROL_COMPONENTS</param-name>
<param-value></param-value>
</context-param>
-->
<context-param>
<description>
For generated resources, such as encrypt generation data, it's encoded in
the resource URL. For example, URL for an image generated from the mediaOutput
component contains a name of a generation method, since for a hacker attack,
it is possible to create a request for any JSF baked beans or other attributes.
To prevent such attacks, set this parameter to "true" in critical applications
(works with JRE > 1.4 )
</description>
<param-name>org.ajax4jsf.ENCRYPT_RESOURCE_DATA</param-name>
<param-value>false</param-value>
</context-param>
<context-param>
<description>
Is a password for encryption of resources data. If isn't set,
a random password is used.
</description>
<param-name>org.ajax4jsf.ENCRYPT_PASSWORD</param-name>
<param-value>random</param-value>
</context-param>
<context-param>
<description>
It doesn't allow framework to reformat JavaScript files (makes it impossible to debug)
</description>
<param-name>org.ajax4jsf.COMPRESS_SCRIPT</param-name>
<param-value>true</param-value>
</context-param>
<context-param>
<description>
Defines prefix which is added to all URIs of generated resources. This prefix
designed to handle RichFaces generated resources requests.
</description>
<param-name>org.ajax4jsf.RESOURCE_URI_PREFIX</param-name>
<param-value>a4j</param-value>
</context-param>
<context-param>
<description>
Defines prefix which is added to URIs of global resources. This prefix designed
to handle RichFaces generated resources requests.
</description>
<param-name>org.ajax4jsf.GLOBAL_RESOURCE_URI_PREFIX</param-name>
<param-value>a4j/g</param-value>
</context-param>
<context-param>
<description>
Defines prefix which is used for session tracking for generated resources.
This prefix designed to handle RichFaces generated resources requests.
</description>
<param-name>org.ajax4jsf.SESSION_RESOURCE_URI_PREFIX</param-name>
<param-value>a4j/s</param-value>
</context-param>
<context-param>
<description>
Defines in seconds how long streamed back to browser resources can be cached.
</description>
<param-name>org.ajax4jsf.DEFAULT_EXPIRE</param-name>
<param-value>86400</param-value>
</context-param>
<context-param>
<description>
If enabled the component state (not the tree) will be serialized before being
stored in the session. This may be desirable for applications that may have
issues with view state being sensitive to model changes. Instead of this
parameter can use com.sun.faces.serializeServerState and
org.apache.myfaces.SERIALIZE_STATE_IN_SESSION parameters for
corresponding environments.
</description>
<param-name>org.ajax4jsf.SERIALIZE_SERVER_STATE</param-name>
<param-value>false</param-value>
</context-param>
<!-- -->
<!-- JSF servlets -->
<!-- -->
<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>*.htmlx</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>Faces Servlet</servlet-name>
<url-pattern>/faces/*</url-pattern>
</servlet-mapping>
<!-- -->
<!-- JSF filters filters / listeners -->
<!-- -->
<filter>
<filter-name>extensionsFilter</filter-name>
<filter-class>org.apache.myfaces.webapp.filter.ExtensionsFilter</filter-class>
<init-param>
<description>
Set the size limit for uploaded files.
Format: 10 - 10 bytes
10k - 10 KB
10m - 10 MB
1g - 1 GB
</description>
<param-name>uploadMaxFileSize</param-name>
<param-value>5m</param-value>
</init-param>
<init-param>
<description>
Set the threshold size - files
below this limit are stored in memory, files above
this limit are stored on disk.
Format: 10 - 10 bytes
10k - 10 KB
10m - 10 MB
1g - 1 GB
</description>
<param-name>uploadThresholdSize</param-name>
<param-value>100k</param-value>
</init-param>
</filter>
<!-- mapping for adding <script/>, <link/>, and other resource tags to JSF-pages -->
<filter-mapping>
<filter-name>extensionsFilter</filter-name>
<!-- servlet-name must match the name of your javax.faces.webapp.FacesServlet -->
<servlet-name>Faces Servlet</servlet-name>
</filter-mapping>
<filter-mapping>
<filter-name>extensionsFilter</filter-name>
<url-pattern>*.htmlx</url-pattern>
</filter-mapping>
<filter-mapping>
<filter-name>extensionsFilter</filter-name>
<url-pattern>/faces/*</url-pattern>
</filter-mapping>
<!-- -->
<!-- Richfaces filters / listeners -->
<!-- -->
<filter>
<display-name>RichFaces Filter</display-name>
<filter-name>richfaces</filter-name>
<filter-class>org.ajax4jsf.Filter</filter-class>
</filter>
<filter-mapping>
<filter-name>richfaces</filter-name>
<servlet-name>Faces Servlet</servlet-name>
<dispatcher>REQUEST</dispatcher>
<dispatcher>FORWARD</dispatcher>
<dispatcher>INCLUDE</dispatcher>
</filter-mapping>
<!-- -->
<!-- Apache Orchestra filters / listeners -->
<!-- -->
<!--
Orchestra feature needed to support-separate conversation-per-window.
It ensures - that a query parameter "conversationId=NNN" is attached
to each url within the - generated html page.
-->
<filter>
<filter-name>requestParameterFilter</filter-name>
<filter-class>
org.apache.myfaces.orchestra.requestParameterProvider.RequestParameterServletFilter
</filter-class>
</filter>
<!--
The session listener tracks each user's session to manage the
conversations that - are associated with that session. Some
initialization is also done on webapp startup.
-->
<listener>
<listener-class>
org.apache.myfaces.orchestra.conversation.servlet.ConversationManagerSessionListener
</listener-class>
</listener>
<!-- -->
<!-- Spring filters / listeners -->
<!-- -->
<!-- Add support for Spring Security filters -->
<filter>
<filter-name>springSecurityFilterChain</filter-name>
<filter-class>org.springframework.web.filter.DelegatingFilterProxy</filter-class>
</filter>
<filter-mapping>
<filter-name>springSecurityFilterChain</filter-name>
<url-pattern>/*</url-pattern>
<dispatcher>FORWARD</dispatcher>
<dispatcher>REQUEST</dispatcher>
</filter-mapping>
<!-- Place constraints on a single user's ability to log in -->
<listener>
<listener-class>
org.springframework.security.ui.session.HttpSessionEventPublisher
</listener-class>
</listener>
<!-- Handle Spring application context lifecycle -->
<listener>
<listener-class>
org.springframework.web.context.ContextLoaderListener
</listener-class>
</listener>
<!-- Add support for Spring beans with scope="request" -->
<listener>
<listener-class>
org.springframework.web.context.request.RequestContextListener
</listener-class>
</listener>
<!-- -->
<!-- Application servlets -->
<!-- -->
<servlet>
<description>
Generic request redirector.
Provides application specific vanity URLs.
</description>
<servlet-name>requestRedirectorServlet</servlet-name>
<servlet-class>xxx.srf.process.RequestRedirector</servlet-class>
<init-param>
<param-name>/login(/)?</param-name>
<param-value>/public/auth/login.htmlx</param-value>
</init-param>
<init-param>
<param-name>/admin(/)?</param-name>
<param-value>/public/auth/admlogin.htmlx</param-value>
</init-param>
</servlet>
<servlet-mapping>
<servlet-name>requestRedirectorServlet</servlet-name>
<url-pattern>/login</url-pattern>
<url-pattern>/admin</url-pattern>
</servlet-mapping>
<servlet>
<description>
Servlet to retrieve a signature image.
</description>
<servlet-name>imageServlet</servlet-name>
<servlet-class>xxx.srf.util.ImageServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>imageServlet</servlet-name>
<url-pattern>/ImageServlet</url-pattern>
</servlet-mapping>
<servlet>
<description>
Servlet to retrieve a PDF.
</description>
<servlet-name>pdfServlet</servlet-name>
<servlet-class>xxx.srf.process.PdfServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>pdfServlet</servlet-name>
<url-pattern>/PdfServlet</url-pattern>
</servlet-mapping>
<servlet>
<description>
Servlet to handle consent form.
</description>
<servlet-name>consentServlet</servlet-name>
<servlet-class>xxx.srf.process.ConsentServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>consentServlet</servlet-name>
<url-pattern>/consent/*</url-pattern>
</servlet-mapping>
<servlet>
<description>
Servlet Serves successful login response.
</description>
<servlet-name>loginSuccessServlet</servlet-name>
<servlet-class>xxx.srf.process.LoginSuccessNavigatorServlet</servlet-class>
<load-on-startup>4</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>loginSuccessServlet</servlet-name>
<url-pattern>/LoginSuccess</url-pattern>
</servlet-mapping>
<servlet>
<description>
Servlet Serves login failure.
</description>
<servlet-name>loginFailServlet</servlet-name>
<servlet-class>xxx.srf.process.LoginFailServlet</servlet-class>
<load-on-startup>4</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>loginFailServlet</servlet-name>
<url-pattern>/LoginFailed</url-pattern>
</servlet-mapping>
<!-- -->
<!-- Application filters -->
<!-- -->
<!-- Error logger -->
<filter>
<filter-name>xxxErrorLogger</filter-name>
<filter-class>xxx.srf.web.filter.ErrorLogger</filter-class>
</filter>
<filter-mapping>
<filter-name>xxxErrorLogger</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<!-- Request dumper -->
<filter>
<filter-name>xxxRequestDumper</filter-name>
<filter-class>xxx.srf.web.filter.RequestDumper</filter-class>
<init-param>
<param-name>showHeaders</param-name>
<param-value>false</param-value>
</init-param>
</filter>
<filter-mapping>
<filter-name>xxxRequestDumper</filter-name>
<url-pattern>*.htmlx</url-pattern>
<url-pattern>*.jsp</url-pattern>
</filter-mapping>
<!-- -->
<!-- Session configuration -->
<!-- -->
<session-config>
<session-timeout>20</session-timeout>
</session-config>
<!-- -->
<!-- Error Pages -->
<!-- -->
<error-page>
<exception-type>
javax.faces.application.ViewExpiredException
</exception-type>
<!-- JSP page used due to invalid JSF view state -->
<location>/public/error/view-expired.jsp</location>
</error-page>
<error-page>
<error-code>500</error-code>
<!-- JSP page used due to unknown JSF state on error -->
<location>/public/error/error.jsp</location>
</error-page>
<error-page>
<error-code>503</error-code>
<!-- JSP page used due to unknown JSF state on error -->
<location>/public/error/error.jsp</location>
</error-page>
<error-page>
<error-code>400</error-code>
<!-- JSP page used due to unknown JSF state on error -->
<location>/public/error/error.jsp</location>
</error-page>
<error-page>
<error-code>401</error-code>
<!-- JSP page used due to unknown JSF state on error -->
<location>/public/error/error.jsp</location>
</error-page>
<error-page>
<error-code>404</error-code>
<!-- JSP page used due to unknown JSF state on error -->
<location>/public/error/error.jsp</location>
</error-page>
<!-- -->
<!-- Welcome files -->
<!-- -->
<welcome-file-list>
<welcome-file>index.jsp</welcome-file>
</welcome-file-list>
</web-app>