web.xml
<?xml version="1.0" encoding="UTF-8"?> <web-app id="WebApp_ID" version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"> <display-name>FacesPortletExample</display-name> <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 form. Default is server.</description> <param-name>javax.faces.STATE_SAVING_METHOD</param-name> <param-value>server</param-value> </context-param> <context-param> <description> Comma-delimited list of context-relative resource paths under which the JSF implementation will look for application configuration resources, before loading a configuration resource named /WEB-INF/facesconfig.xml (if such a resource exists).</description> <param-name>javax.faces.CONFIG_FILES</param-name> <param-value></param-value> </context-param> <context-param> <description> The default suffix for extension-mapped resources that contain JSF components. Default is '.jsp'.</description> <param-name>javax.faces.DEFAULT_SUFFIX</param-name> <param-value>.jsp</param-value> </context-param> <context-param> <description> Monitors Faces JSP files for modifications and synchronizes a running server with the changes without restarting the server. If this parameter is set to false or removed from the deployment descriptor, any changes made to Faces JSP files may not be seen by the server until it is restarted. This parameter is usually set to true while the Faces JSP files are being developed and debugged in order to improve the performance of the development environment.</description> <param-name>com.ibm.ws.jsf.JSP_UPDATE_CHECK</param-name> <param-value>true</param-value> </context-param> <context-param> <description> Load JSF runtime when the application server starts up. If this parameter is set to false or removed, JSF runtime will be loaded and initialized when the first JSF request is processed. This may disable custom JSF extensions, such as factories defined in the project.</description> <param-name>com.ibm.ws.jsf.LOAD_FACES_CONFIG_AT_STARTUP</param-name> <param-value>true</param-value> </context-param> <context-param> <description> If set to true disables use of MultipartFacesContext, allowing underlying implementations to be used. MultipartFacesContext is required when the FileUpload component is used, and can be disabled otherwise.</description> <param-name>com.ibm.faces.DISABLE_JWL_MULTIPART_CONTEXT</param-name> <param-value>false</param-value> </context-param> <context-param> <description> Value, in milliseconds, to be used for Expires header for resources served by the JavaScript Resource Servlet. Default is never (31536000000 milliseconds or 1 year).</description> <param-name>com.ibm.faces.RESOURCE_EXPIRE_MS</param-name> <param-value>31536000000</param-value> </context-param> <context-param> <description> Defines the strictness of the conversion when converting from a string to a date. The higher the value, the more exactly the value must conform to the format. If 0 (liberal), all 'literals' are ignored while parsing a value, mis-ordered components will be rearranged, any missing component is supplied using the current datetime, misspellings and incomplete spellings are allowed (to the extent that they can be evaluated), 'E' and other non-unique components are ignored. If 1 (strict), all 'literals' are ignored while parsing a value, any missing component is supplied using the current datetime, misspellings and incomplete spellings are allowed (to the extent that they can be evaluated), 'E' and other non-unique components are ignored. For example if the pattern is MMMM dd, yyyy a user can enter 'Feb/02/04' and it will be parsed as February 02, 2004. If 2 (very strict), an exact match is required except long month names can be 'shortened' to the minimum number of unique characters and 'E' and other non-unique components are ignored. Literals must match exactly. Default is 1.</description> <param-name>com.ibm.faces.DATETIME_ASSIST_STRICTNESS</param-name> <param-value>1</param-value> </context-param> <context-param> <description> Defines the strictness of the conversion when converting from a string to a number. The higher the value, the more exactly the value must conform to the pattern. For numbers, currently strictness levels of 0 and 1 are equivalent. If the strictness is 2, if number is signed, the sign must be provided (otherwise it's assumed positive). Default is 1.</description> <param-name>com.ibm.faces.NUMBER_ASSIST_STRICTNESS</param-name> <param-value>1</param-value> </context-param> <context-param> <description> Defines the path for resources such as JavaScript libraries and images. The value can be either: 1. An empty string. Context path of the current application will be used. 2. A path string. Example: /project13. A number. Specifies the number of nodes to use from the context path starting from the left. Example: With a value of 1 if the context path is /screen/faces/SSID110267549/RID1102676 the path will be evaluated as /screen Default is an empty string.</description> <param-name>com.ibm.faces.USE_UNENCODED_CONTEXT_PATH</param-name> <param-value></param-value> </context-param> <context-param> <description> Sets a custom url-pattern for the JavaScript Resource servlet. Should match servlet mapping setting for the JavaScript Resource servlet. If the default default mapping value '/.ibmjsfres/*' is modified, this context-param should also be modified. </description> <param-name>com.ibm.faces.JS_RESOURCE_SERVLET_URL_PATTERN</param-name> <param-value>/.ibmjsfres/*</param-value> </context-param> <context-param> <description> If set to true, forces JavaScript Resource Servlet to cache all resources on the server. This can be useful when client-side caching is turned off.</description> <param-name>com.ibm.faces.JS_RESOURCE_SERVLET_CACHE</param-name> <param-value>false</param-value> </context-param> <context-param> <description> Sets a custom charset mapping properties file similar to converter.properties in WAS.</description> <param-name>com.ibm.faces.ENCODING_MAPPING</param-name> <param-value>converter.properties</param-value> </context-param> <context-param> <description> Number of Views to be stored in the session when Enhanced State Saving is being used. Default is 15.</description> <param-name>com.ibm.faces.ENHANCED_SERVER_STATE_SAVING_SESSION_STORED_VIEWS</param-name> <param-value>15</param-value> </context-param> <context-param> <description> If set to true, the entire JavaScript library, containing code for all components, will be included in the generated pages as one file. If set to false or removed, multiple smaller JavaScript files will be included, depending on the components used on the page.Default is false.</description> <param-name>com.ibm.faces.USE_HXCLIENT_FULL</param-name> <param-value>false</param-value> </context-param> <context-param> <description> If false, client data will not be encoded, allowing multiple portlets on a page to share the same client data model. By default, client data will be encoded, so any value other than &quot;false&quot;, or the absence of the parameter, will result in client data being encoded. This also affects using Page Data with the Chart or Data Tree. By default Page Data is encoded. Setting this value to &quot;false&quot; will also unencode any Page Data that is being used with either a Chart or a Data Tree.</description> <param-name>com.ibm.faces.ENCODE_DATA</param-name> <param-value>true</param-value> </context-param> <context-param> <description> When using Ajax components with Websphere Portal server 5.1 (versions 5.1.0.3 onwards), this value must be set to true.</description> <param-name>com.ibm.faces.TURN_OFF_AJAX_PORTAL_60_PATH</param-name> <param-value>false</param-value> </context-param> <context-param> <description> Specifies maximum size for the request content processed by MultipartExternalContext. Can be used to prevent large files from being uploaded. Takes an integer value, in bytes. 0 or empty means there is no limit. Default is no limit. </description> <param-name>com.ibm.faces.MAX_REQUEST_CONTENT_SIZE</param-name> <param-value>0</param-value> </context-param> <listener> <listener-class>com.sun.faces.config.ConfigureListener</listener-class> </listener> <servlet id="Servlet_1157703681984"> <servlet-name>JavaScript Resource Servlet</servlet-name> <servlet-class> com.ibm.faces.webapp.JSResourceServlet</servlet-class> <load-on-startup>-1</load-on-startup> </servlet> <servlet id="Servlet_1218615180343"> <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>JavaScript Resource Servlet</servlet-name> <url-pattern>/.ibmjsfres/*</url-pattern> </servlet-mapping> <servlet-mapping> <servlet-name>Faces Servlet</servlet-name> <url-pattern>/faces/*</url-pattern> </servlet-mapping> <servlet-mapping> <servlet-name>Faces Servlet</servlet-name> <url-pattern>*.faces</url-pattern> </servlet-mapping> <welcome-file-list> <welcome-file>index.html</welcome-file> <welcome-file>index.htm</welcome-file> <welcome-file>index.jsp</welcome-file> <welcome-file>default.html</welcome-file> <welcome-file>default.htm</welcome-file> <welcome-file>default.jsp</welcome-file> </welcome-file-list> <jsp-config> <taglib> <taglib-uri>http://java.sun.com/portlet</taglib-uri> <taglib-location>/WEB-INF/tld/std-portlet.tld</taglib-location> </taglib> </jsp-config> </web-app>