jboss seam优化,配置web.xml

沈成天
2023-12-01

seam做的项目,用war打包,针对一些richface和ajax4jsf的优化,索性把整个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" 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"
	version="2.5">

	<context-param>
		<param-name>org.richfaces.SKIN</param-name>
		<param-value>laguna</param-value>
	</context-param>

	<context-param>
		<param-name>org.richfaces.LoadStyleStrategy</param-name>
		<param-value>ALL</param-value>
	</context-param>

	<context-param>
		<param-name>org.richfaces.LoadScriptStrategy</param-name>
		<param-value>ALL</param-value>
	</context-param>

	<filter>
		<display-name>RichFaces Filter</display-name>
		<filter-name>richfaces</filter-name>
		<filter-class>org.ajax4jsf.Filter</filter-class>
		<init-param>
			<param-name>enable-cache</param-name>
			<param-value>true</param-value>
		</init-param>
		<init-param>
			<param-name>forceparser</param-name>
			<param-value>false</param-value>
		</init-param>
		<init-param>
			<param-name>forcenotrf</param-name>
			<param-value>false</param-value>
		</init-param>
		<init-param>
			<param-name>createTempFiles</param-name>
			<param-value>true</param-value>
		</init-param>
		<init-param>
			<param-name>maxRequestSize</param-name>
			<param-value>1024000000</param-value>
		</init-param>
	</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>

	<context-param>
		<param-name>org.ajax4jsf.xmlparser.ORDER</param-name>
		<param-value>NEKO</param-value>
	</context-param>
	<context-param>
		<param-name>org.ajax4jsf.xmlparser.NEKO</param-name>
		<param-value>.*\..*</param-value>
	</context-param>

	<context-param>
		<param-name>org.ajax4jsf.COMPRESS_SCRIPT</param-name>
		<param-value>true</param-value>
	</context-param>

	<listener>
		<listener-class>com.sun.faces.config.ConfigureListener</listener-class>
	</listener>
	<listener>
		<listener-class>org.jboss.seam.servlet.SeamListener</listener-class>
	</listener>
	<listener>
		<listener-class>com.dc.product.common.listener.ProductSessionListener</listener-class>
	</listener>

	<filter>
		<filter-name>Seam Filter</filter-name>
		<filter-class>org.jboss.seam.servlet.SeamFilter</filter-class>
	</filter>
	<filter-mapping>
		<filter-name>Seam Filter</filter-name>
		<url-pattern>/*</url-pattern>
	</filter-mapping>

	<servlet>
		<servlet-name>Seam Resource Servlet</servlet-name>
		<servlet-class>org.jboss.seam.servlet.SeamResourceServlet</servlet-class>
	</servlet>
	<servlet-mapping>
		<servlet-name>Seam Resource Servlet</servlet-name>
		<url-pattern>/seam/resource/*</url-pattern>
	</servlet-mapping>

	<context-param>
		<param-name>facelets.DEVELOPMENT</param-name>
		<param-value>true</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>javax.faces.STATE_SAVING_METHOD</param-name>
		<param-value>server</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>*.seam</url-pattern>
	</servlet-mapping>

	<servlet>
		<servlet-name>Document Store Servlet</servlet-name>
		<servlet-class>org.jboss.seam.document.DocumentStoreServlet</servlet-class>
	</servlet>
	<servlet-mapping>
		<servlet-name>Document Store Servlet</servlet-name>
		<url-pattern>*.pdf</url-pattern>
	</servlet-mapping>
	<servlet-mapping>
		<servlet-name>Document Store Servlet</servlet-name>
		<url-pattern>*.xls</url-pattern>
	</servlet-mapping>

	<security-constraint>
		<display-name>Restrict raw XHTML Documents</display-name>
		<web-resource-collection>
			<web-resource-name>XHTML</web-resource-name>
			<url-pattern>*.xhtml</url-pattern>
		</web-resource-collection>
		<auth-constraint />
	</security-constraint>
</web-app>
 

 

 类似资料: