Configure JSF engine parameters
WAS does not support the modification of deployment descriptor extension parameters through the administrative console or through administrative scripting.
To add, change or delete JSF engine configuration parameters...
- Edit WEB-INF/web.xml.
JSP engine configuration parameters are stored in a web module's configuration directory or in a web modules's binaries directory in the WEB-INF/web.xml file. Edit WEB-INF/web.xml.from:
- The configuration directory, as in the following example: {WAS_ROOT}/profiles/profilename/config/cells/cellname/applications/enterpriseappname/ deployments/deployedname/webmodulename
- The binaries directory if an application was deployed into WebSphere Application Server with the flag Use Binary Configuration set to true. An example of a binaries directory is: {WAS_ROOT}/profiles/profilename/installedApps/nodename/EnterpriseAppName/WebModuleName/
JSF engine configuration parameters are stored in a web module's configuration directory or in a web modules's binaries directory in the WEB-INF/web.xml file. Open the WEB-INF/web.xml file from:
- The configuration directory, as in the following example: profile_root/config/cells/cellName/applications/enterpriseAppName/deployments/deployedName/webModuleName/WEB-INF/web.xml
- The binaries directory if an application was deployed into WebSphere Application Server with the flag Use Binary Configuration set to true. An example of a binaries directory is: profile_root/installedApps/nodeName/applicationName.ear/applicationName.war/WEB-INF/web.xml
- Edit the WEB-INF/web.xml file.
- To add configuration parameters, use the following format:
<context-param> <description>descriptive text</description> <param-name>parameter name</param-name> <param-value>parameter value</param-value> </context-param>
- To delete configuration parameters, either delete the line from the file, or enclose the statement with <!-- --> tags.
- Save the file.
- Restart the Enterprise Application. It is not necessary to restart the server for parameter changes to take effect. However, some JSP engine configuration parameters affect the Java source code that is generated for a JSP. If such a parameter is changed, then you must retranslate the JSP files in the web module to regenerate Java source. Use the batch compiler to retranslate all JSP files in a web module. The batch compiler uses the JSP engine configuration parameters that we have set in web.xml, unless you specifically override them. The JSP engine configuration topic identifies the parameters that affect the generated Java source.
Example
The following is a sample of the WEB-INF/web.xml file.<?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" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" id="WebApp_ID" version="2.5"> <display-name>Servlet 2.5 example</display-name> <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> <context-param> <param-name>javax.faces.CONFIG_FILES</param-name> <param-value>/WEB-INF/faces-config.xml</param-value> </context-param> <context-param> <param-name>javax.faces.STATE_SAVING_METHOD</param-name> <param-value>server</param-value> </context-param> <context-param> <param-name>com.ibm.ws.jsf.LOAD_FACES_CONFIG_AT_STARTUP</param-name> <param-value>true</param-value> </context-param> <servlet> <servlet-name>Faces Servlet</servlet-name> <servlet-class>javax.faces.webapp.FacesServlet</servlet-class> </servlet> <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> </web-app>
Subtopics
- JSF engine configuration parameters
In WebSphere Application Server, we can configure the JavaServer Faces (JSF) engine configuration parameters for optimal performance in a production server environment and for the needs of developers in a development environment.
Related concepts
JavaServer Faces
Related tasks
Configure JavaServer Faces implementation Manage JavaServer Faces implementations