<?xml version="1.0"?>
<persistence xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd" version="1.0">
<persistence-unit name="itcast" transaction-type="RESOURCE_LOCAL">
<provider>org.hibernate.ejb.HibernatePersistence</provider>
<properties>
<property name="hibernate.dialect" value="org.hibernate.dialect.MySQL5Dialect"/>
<property name="hibernate.max_fetch_depth" value="3"/>
<property name="hibernate.hbm2ddl.auto" value="update"/>
<property name="hibernate.jdbc.fetch_size" value="18"/>
<property name="hibernate.jdbc.batch_size" value="10"/>
<property name="hibernate.show_sql" value="false"/>
<property name="hibernate.format_sql" value="false"/>
</properties>
</persistence-unit>
</persistence>
---------------------------------------------------------------
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:aop="http://www.springframework.org/schema/aop"
xmlns:tx="http://www.springframework.org/schema/tx"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-2.5.xsd
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.5.xsd
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.5.xsd">
<aop:aspectj-autoproxy/>
<context:component-scan base-package="cn.itcast"/>
<!-- 使用数据源和指定persistence.xml位置的方式创建entityManagerFactory,如果使用的不是hibernate JPA实现,
需要在tomcat作一些特殊配置.具体参考手册
注意:使用该方式需要把persistence.xml中的hibernate.connection.driver_class,hibernate.connection.username,hibernate.connection.password,hibernate.connection.url配置删除
-->
<context:property-placeholder location="classpath:jdbc.properties"/>
<bean id="dataSource" class="com.mchange.v2.c3p0.ComboPooledDataSource" destroy-method="close">
<property name="driverClass" value="${driverClass}"/>
<property name="jdbcUrl" value="${jdbcUrl}" />
<property name="user" value="${user}" />
<property name="password" value="${password}"/>
<!--连接池中保留的最小连接数。-->
<property name="minPoolSize" value="${minPoolSize}"/>
<!--连接池中保留的最大连接数。Default: 15 -->
<property name="maxPoolSize" value="${maxPoolSize}" />
<!--初始化时获取的连接数,取值应在minPoolSize与maxPoolSize之间。Default: 3 -->
<property name="initialPoolSize" value="${initialPoolSize}"/>
<!--最大空闲时间,60秒内未使用则连接被丢弃。若为0则永不丢弃。Default: 0 -->
<property name="maxIdleTime" value="${maxIdleTime}" />
<!--当连接池中的连接耗尽的时候c3p0一次同时获取的连接数。Default: 3 -->
<property name="acquireIncrement" value="${acquireIncrement}" />
</bean>
<bean id="entityManagerFactory" class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean">
<property name="dataSource" ref="dataSource" />
<property name="persistenceXmlLocation" value="classpath:META-INF/persistence.xml" />
<property name="loadTimeWeaver">
<bean class="org.springframework.instrument.classloading.InstrumentationLoadTimeWeaver"/>
</property>
</bean>
<bean id="transactionManager" class="org.springframework.orm.jpa.JpaTransactionManager">
<property name="entityManagerFactory" ref="entityManagerFactory"/>
</bean>
<tx:annotation-driven transaction-manager="transactionManager"/>
<bean id="compass" class="org.compass.spring.LocalCompassBean">
<property name="classMappings">
<list>
<value>cn.xxx.bean.product.ProductInfo</value>
<value>cn.xxx.bean.product.Brand</value>
<value>cn.xxx.bean.product.ProductStyle</value>
<value>cn.xxx.bean.product.ProductType</value>
</list>
</property>
<property name="compassSettings">
<props>
<prop key="compass.engine.analyzer.default.type">net.paoding.analysis.analyzer.PaodingAnalyzer</prop>
<prop key="compass.engine.connection">file://d:/index</prop>
<!-- 在内存中建立索引
<prop key="compass.engine.connection">ram://index</prop>
-->
<prop key="compass.engine.highlighter.default.formatter.simple.pre"><![CDATA[<font color='red'>]]></prop>
<prop key="compass.engine.highlighter.default.formatter.simple.post"><![CDATA[</font>]]></prop>
<prop key="compass.transaction.factory">org.compass.spring.transaction.SpringSyncTransactionFactory</prop>
</props>
</property>
<property name="transactionManager" ref="transactionManager" />
</bean>
<!-- 自动完成 索引的添加/更新/删除操作-->
<bean id="compassGps" class="org.compass.gps.impl.SingleCompassGps" init-method="start" destroy-method="stop">
<property name="compass" ref="compass" />
<property name="gpsDevices">
<list>
<!-- 设置JPA驱动 -->
<bean class="org.compass.gps.device.jpa.JpaGpsDevice">
<property name="name" value="jpaDevice" />
<property name="entityManagerFactory" ref="entityManagerFactory" />
<property name="injectEntityLifecycleListener" value="true"/>
</bean>
</list>
</property>
</bean>
</beans>
-----------------------------------------------------------------------
driverClass=org.gjt.mm.mysql.Driver
jdbcUrl=jdbc:mysql://localhost:3306/itcast?useUnicode=true&characterEncoding=UTF-8
user=root
password=123456
minPoolSize=5
maxPoolSize=200
initialPoolSize=5
maxIdleTime=60
acquireIncrement=5
-------------------------------------------------------------------------
log4j.rootLogger=ERROR,console
log4j.appender.console=org.apache.log4j.ConsoleAppender
log4j.appender.console.layout=org.apache.log4j.PatternLayout
log4j.appender.console.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss,SSS} %5p %c:(%F:%L) %n - %m%n
-----------------------------------------------------------------
# CACHE IN MEMORY
#
# If you want to disable memory caching, just uncomment this line.
#
# cache.memory=false
# CACHE KEY
#
# This is the key that will be used to store the cache in the application
# and session scope.
#
# If you want to set the cache key to anything other than the default
# uncomment this line and change the cache.key
#
# cache.key=__oscache_cache
# USE HOST DOMAIN NAME IN KEY
#
# Servers for multiple host domains may wish to add host name info to
# the generation of the key. If this is true, then uncomment the
# following line.
#
# cache.use.host.domain.in.key=true
# CACHE LISTENERS
#
# These hook OSCache events and perform various actions such as logging
# cache hits and misses, or broadcasting to other cache instances across a cluster.
# See the documentation for further information.
#
# cache.event.listeners=com.opensymphony.oscache.plugins.clustersupport.JMSBroadcastingListener, /
# com.opensymphony.oscache.extra.CacheEntryEventListenerImpl, /
# com.opensymphony.oscache.extra.CacheMapAccessEventListenerImpl, /
# com.opensymphony.oscache.extra.ScopeEventListenerImpl, /
# com.opensymphony.oscache.extra.StatisticListenerImpl
# CACHE PERSISTENCE CLASS
#
# Specify the class to use for persistence. If you use the supplied DiskPersistenceListener,
# don't forget to supply the cache.path property to specify the location of the cache
# directory.
#
# If a persistence class is not specified, OSCache will use memory caching only.
#
# cache.persistence.class=com.opensymphony.oscache.plugins.diskpersistence.DiskPersistenceListener
# cache.persistence.class=com.opensymphony.oscache.plugins.diskpersistence.HashDiskPersistenceListener
# CACHE OVERFLOW PERSISTENCE
# Use persistent cache in overflow or not. The default value is false, which means
# the persistent cache will be used at all times for every entry. true is the recommended setting.
#
# cache.persistence.overflow.only=true
# CACHE DIRECTORY
#
# This is the directory on disk where caches will be stored by the DiskPersistenceListener.
# it will be created if it doesn't already exist. Remember that OSCache must have
# write permission to this directory.
#
# Note: for Windows machines, this needs / to be escaped
# ie Windows:
# cache.path=D://oscache
# or *ix:
# cache.path=/opt/myapp/cache
#
# cache.path=d://cache
# CACHE ALGORITHM
#
# Default cache algorithm to use. Note that in order to use an algorithm
# the cache size must also be specified. If the cache size is not specified,
# the cache algorithm will be Unlimited cache.
#
# cache.algorithm=com.opensymphony.oscache.base.algorithm.LRUCache
# cache.algorithm=com.opensymphony.oscache.base.algorithm.FIFOCache
# cache.algorithm=com.opensymphony.oscache.base.algorithm.UnlimitedCache
# THREAD BLOCKING BEHAVIOR
#
# When a request is made for a stale cache entry, it is possible that another thread is already
# in the process of rebuilding that entry. This setting specifies how OSCache handles the
# subsequent 'non-building' threads. The default behaviour (cache.blocking=false) is to serve
# the old content to subsequent threads until the cache entry has been updated. This provides
# the best performance (at the cost of serving slightly stale data). When blocking is enabled,
# threads will instead block until the new cache entry is ready to be served. Once the new entry
# is put in the cache the blocked threads will be restarted and given the new entry.
# Note that even if blocking is disabled, when there is no stale data available to be served
# threads will block until the data is added to the cache by the thread that is responsible
# for building the data.
#
# cache.blocking=false
# CACHE SIZE
#
# Default cache size in number of items. If a size is specified but not
# an algorithm, the cache algorithm used will be LRUCache.
#
cache.capacity=1000
# CACHE UNLIMITED DISK
# Use unlimited disk cache or not. The default value is false, which means
# the disk cache will be limited in size to the value specified by cache.capacity.
#
# cache.unlimited.disk=false
# JMS CLUSTER PROPERTIES
#
# Configuration properties for JMS clustering. See the clustering documentation
# for more information on these settings.
#
#cache.cluster.jms.topic.factory=java:comp/env/jms/TopicConnectionFactory
#cache.cluster.jms.topic.name=java:comp/env/jms/OSCacheTopic
#cache.cluster.jms.node.name=node1
# JAVAGROUPS CLUSTER PROPERTIES
#
# Configuration properites for the JavaGroups clustering. Only one of these
# should be specified. Default values (as shown below) will be used if niether
# property is set. See the clustering documentation and the JavaGroups project
# (www.javagroups.com) for more information on these settings.
#
#cache.cluster.properties=UDP(mcast_addr=231.12.21.132;mcast_port=45566;ip_ttl=32;/
#mcast_send_buf_size=150000;mcast_recv_buf_size=80000):/
#PING(timeout=2000;num_initial_members=3):/
#MERGE2(min_interval=5000;max_interval=10000):/
#FD_SOCK:VERIFY_SUSPECT(timeout=1500):/
#pbcast.NAKACK(gc_lag=50;retransmit_timeout=300,600,1200,2400,4800;max_xmit_size=8192):/
#UNICAST(timeout=300,600,1200,2400):/
#pbcast.STABLE(desired_avg_gossip=20000):/
#FRAG(frag_size=8096;down_thread=false;up_thread=false):/
#pbcast.GMS(join_timeout=5000;join_retry_timeout=2000;shun=false;print_local_addr=true)
#cache.cluster.multicast.ip=231.12.21.132
---------------------------------------------------------
#values are "system-env" or "this";
#if value is "this" , using the paoding.dic.home as dicHome if configed!
#paoding.dic.home.config-fisrt=system-env
#dictionary home (directory)
#"classpath:xxx" means dictionary home is in classpath.
#e.g "classpath:dic" means dictionaries are in "classes/dic" directory or any other classpath directory
paoding.dic.home=classpath:dic
#seconds for dic modification detection
#paoding.dic.detector.interval=60
--------------------------------------------------------
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE struts-config PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 1.3//EN"
"http://struts.apache.org/dtds/struts-config_1_3.dtd">
<struts-config>
<form-beans>
<form-bean name="producttypeform" type="cn.xxx.web.formbean.product.ProductTypeForm"/>
<form-bean name="brandform" type="cn.xxx.web.formbean.product.BrandForm"/>
<form-bean name="uploadfileform" type="cn.xxx.web.formbean.uploadfile.UploadfileForm"/>
<form-bean name="productform" type="cn.xxx.web.formbean.product.ProductForm"/>
<form-bean name="frontProductForm" type="cn.xxx.web.formbean.product.FrontProductForm"/>
<form-bean name="buyerForm" type="cn.xxx.web.formbean.user.BuyerForm"/>
<form-bean name="buyCartForm" type="cn.xxx.web.formbean.shopping.BuyCartForm"/>
<form-bean name="deliverInfoForm" type="cn.xxx.web.formbean.shopping.DeliverInfoForm"/>
<form-bean name="shoppingFinishForm" type="cn.xxx.web.formbean.shopping.ShoppingFinishForm"/>
<form-bean name="orderForm" type="cn.xxx.web.formbean.book.OrderForm"/>
<form-bean name="departmentForm" type="cn.xxx.web.formbean.privilege.DepartmentForm"/>
<form-bean name="employeeForm" type="cn.xxx.web.formbean.privilege.EmployeeForm"/>
<form-bean name="privilegeGroupForm" type="cn.xxx.web.formbean.privilege.PrivilegeGroupForm"/>
<form-bean name="productQueryForm" type="cn.xxx.web.formbean.product.ProductQueryForm"/>
</form-beans>
<global-forwards>
<forward name="message" path="/WEB-INF/page/share/message.jsp" />
<forward name="directUrl" path="/WEB-INF/page/share/directUrl.jsp"/>
</global-forwards>
<action-mappings>
<!-- 系统初始化 -->
<action path="/system/init"/>
<!-- 控制台主页 -->
<action path="/control/center/main" forward="/WEB-INF/page/controlcenter/default.jsp"/>
<action path="/control/center/top" forward="/WEB-INF/page/controlcenter/top.jsp"/>
<action path="/control/center/left" forward="/WEB-INF/page/controlcenter/menu.jsp"/>
<action path="/control/center/right" forward="/WEB-INF/page/controlcenter/right.jsp"/>
<action path="/control/center/end" forward="/WEB-INF/page/controlcenter/end.jsp"/>
<!-- 产品类别分页显示 -->
<action path="/control/product/type/list" name="producttypeform" scope="request">
<forward name="list" path="/WEB-INF/page/product/producttypelist.jsp"/>
</action>
<!-- 产品类别管理 -->
<action path="/control/product/type/manage" name="producttypeform" scope="request" parameter="method">
<forward name="add" path="/WEB-INF/page/product/add_productType.jsp"/>
<forward name="edit" path="/WEB-INF/page/product/edit_productType.jsp"/>
<forward name="query" path="/WEB-INF/page/product/query_productType.jsp"/>
</action>
<!-- 产品品牌分页显示 -->
<action path="/control/brand/list" name="brandform" scope="request">
<forward name="list" path="/WEB-INF/page/product/brandlist.jsp"/>
</action>
<!-- 产品产品管理 -->
<action path="/control/brand/manage" name="brandform" scope="request" parameter="method">
<forward name="add" path="/WEB-INF/page/product/add_brand.jsp"/>
<forward name="edit" path="/WEB-INF/page/product/edit_brand.jsp"/>
<forward name="query" path="/WEB-INF/page/product/query_brand.jsp"/>
</action>
<!-- 上传文件管理 -->
<action path="/control/uploadfile/manage" name="uploadfileform" scope="request" parameter="method">
<forward name="upload" path="/WEB-INF/page/uploadfile/upload.jsp"/>
<forward name="uploadfinish" path="/WEB-INF/page/uploadfile/fileuploadfinish.jsp"/>
<forward name="error" path="/WEB-INF/page/uploadfile/error.jsp"/>
</action>
<!-- 上传文件分页显示 -->
<action path="/control/uploadfile/list" name="uploadfileform" scope="request">
<forward name="list" path="/WEB-INF/page/uploadfile/uploadfilelist.jsp"/>
</action>
<!-- 产品分页显示 -->
<action path="/control/product/list" name="productform" scope="request">
<forward name="list" path="/WEB-INF/page/product/productlist.jsp"/>
</action>
<!-- 产品管理 -->
<action path="/control/product/manage" name="productform" scope="request" parameter="method">
<forward name="add" path="/WEB-INF/page/product/add_product.jsp"/>
<forward name="edit" path="/WEB-INF/page/product/edit_product.jsp"/>
<forward name="typeselect" path="/WEB-INF/page/product/productTypeSelect.jsp"/>
<forward name="query" path="/WEB-INF/page/product/query_product.jsp"/>
</action>
<!-- 产品样式显示 -->
<action path="/control/product/style/list" name="productform" scope="request">
<forward name="list" path="/WEB-INF/page/product/productstylelist.jsp"/>
</action>
<!-- 产品样式管理 -->
<action path="/control/product/style/manage" name="productform" scope="request" parameter="method">
<forward name="add" path="/WEB-INF/page/product/add_productstyle.jsp"/>
<forward name="edit" path="/WEB-INF/page/product/edit_productstyle.jsp"/>
</action>
<!-- 网站用户列表显示 -->
<action path="/control/user/list" name="buyerForm" scope="request" validate="false">
<forward name="list" path="/WEB-INF/page/user/userlist.jsp"/>
</action>
<!-- 网站用户管理 -->
<action path="/control/user/manage" name="buyerForm" scope="request" validate="false" parameter="method">
</action>
<action path="/control/user/query" forward="/WEB-INF/page/user/query.jsp"/>
<!-- 订单列表显示 -->
<action path="/control/order/list" name="orderForm" scope="request" validate="false">
<forward name="list" path="/WEB-INF/page/book/orderlist.jsp"/>
</action>
<action path="/control/order/query" forward="/WEB-INF/page/book/queryorder.jsp" />
<!-- 订单信息查看 -->
<action path="/control/order/view" name="orderForm" scope="request" validate="false">
<forward name="orderview" path="/WEB-INF/page/book/orderview.jsp"/>
</action>
<!-- 订单管理 -->
<action path="/control/order/manage" name="orderForm" scope="request" validate="false" parameter="method">
<forward name="modifyContact" path="/WEB-INF/page/book/modifyContactInfo.jsp" />
<forward name="modifyDeliverInfo" path="/WEB-INF/page/book/modifyDeliverInfo.jsp" />
<forward name="modifyPaymentWay" path="/WEB-INF/page/book/modifyPaymentWay.jsp" />
<forward name="modifyDeliverWay" path="/WEB-INF/page/book/modifyDeliverWay.jsp" />
<forward name="modifyProductAmount" path="/WEB-INF/page/book/modifyProductAmount.jsp" />
<forward name="modifydeliverFee" path="/WEB-INF/page/book/modifydeliverFee.jsp" />
<forward name="print" path="/WEB-INF/page/book/print.jsp" />
<forward name="ordermessage" path="/WEB-INF/page/book/ordermessage.jsp" />
</action>
<!-- 部门分页列表 -->
<action path="/control/department/list" name="departmentForm" scope="request" validate="false">
<forward name="list" path="/WEB-INF/page/department/departmentlist.jsp"/>
</action>
<!-- 部门管理 -->
<action path="/control/department/manage" name="departmentForm" scope="request" validate="false" parameter="method">
<forward name="addDepartment" path="/WEB-INF/page/department/adddepartment.jsp" />
<forward name="editDepartment" path="/WEB-INF/page/department/editdepartment.jsp" />
</action>
<!-- 员工分页列表 -->
<action path="/control/employee/list" name="employeeForm" scope="request" validate="false">
<forward name="list" path="/WEB-INF/page/department/employeelist.jsp"/>
</action>
<!-- 员工管理 -->
<action path="/control/employee/manage" name="employeeForm" scope="request" validate="false" parameter="method">
<forward name="reg" path="/WEB-INF/page/department/addemployee.jsp" />
<forward name="usernameIsExsit" path="/WEB-INF/page/department/usernameIsExsit.jsp" />
<forward name="edit" path="/WEB-INF/page/department/editemployee.jsp" />
<forward name="query" path="/WEB-INF/page/department/query.jsp" />
<forward name="privilegeSet" path="/WEB-INF/page/department/privilegeSet.jsp" />
</action>
<!-- 权限组分页列表 -->
<action path="/control/privilegegroup/list" name="privilegeGroupForm" scope="request" validate="false">
<forward name="list" path="/WEB-INF/page/department/privilegegrouplist.jsp"/>
</action>
<!-- 权限组管理 -->
<action path="/control/privilegegroup/manage" name="privilegeGroupForm" scope="request" validate="false" parameter="method">
<forward name="add" path="/WEB-INF/page/department/addprivilegegroup.jsp" />
<forward name="edit" path="/WEB-INF/page/department/editprivilegegroup.jsp" />
</action>
<!-- 员工登录 -->
<action path="/employee/logon" name="employeeForm" scope="request" validate="false">
<forward name="control" path="/control/center/main.do" redirect="true"/>
<forward name="logon" path="/WEB-INF/page/department/logon.jsp"/>
</action>
<!-- 员工退出登录 -->
<action path="/employee/logout" name="employeeForm" scope="request" validate="false">
<forward name="logon" path="/employee/logon.do" redirect="true"/>
</action>
<!-- #####################################前台显示######################################## -->
<!-- 网站用户注册 -->
<action path="/user/reg" name="buyerForm" scope="request" validate="false" parameter="method">
<forward name="reg" path="/WEB-INF/page/user/userReg.jsp"/>
<forward name="regFinish" path="/WEB-INF/page/user/regFinish.jsp"/>
<forward name="checkuser" path="/WEB-INF/page/user/checkuser.jsp"/>
</action>
<!-- 网站用户登录 -->
<action path="/user/logon" name="buyerForm" scope="request" validate="false">
<forward name="logon" path="/WEB-INF/page/user/logon.jsp"/>
</action>
<!-- 网站用户退出登录 -->
<action path="/user/logout" name="buyerForm" scope="request">
<forward name="logon" redirect="true" path="/user/logon.do"/>
</action>
<!-- 产品列表显示 -->
<action path="/product/list/display" name="frontProductForm" scope="request">
<forward name="list_image" path="/WEB-INF/page/product/frontpage/productlist.jsp"/>
<forward name="list_imagetext" path="/WEB-INF/page/product/frontpage/productlist_text.jsp"/>
</action>
<!-- 产品样式管理 -->
<action path="/product/switch" name="frontProductForm" scope="request" parameter="method">
<forward name="topsell" path="/WEB-INF/page/product/frontpage/topsell.jsp"/>
<forward name="viewHistory" path="/WEB-INF/page/product/frontpage/viewHistory.jsp"/>
<forward name="showimage" path="/WEB-INF/page/product/frontpage/showimage.jsp"/>
</action>
<!-- 产品显示 -->
<action path="/product/view" name="frontProductForm" scope="request">
<forward name="product" path="/WEB-INF/page/product/frontpage/productview.jsp"/>
</action>
<!-- 购物车 -->
<action path="/shopping/cart" name="buyCartForm" scope="request">
<forward name="cart" path="/WEB-INF/page/shopping/cart.jsp"/>
</action>
<!-- 购物车管理 -->
<action path="/shopping/cart/manage" name="buyCartForm" scope="request" parameter="method">
</action>
<!-- 配送信息填写界面 -->
<action path="/customer/shopping/deliver" name="deliverInfoForm" scope="request">
<forward name="deliverinfo" path="/WEB-INF/page/shopping/deliverInfo.jsp"/>
</action>
<!-- 配送方式与支付方式选择界面 -->
<action path="/customer/shopping/paymentway" name="deliverInfoForm" scope="request">
<forward name="paymentway" path="/WEB-INF/page/shopping/paymentway.jsp"/>
</action>
<!-- 配送信息保存 -->
<action path="/customer/shopping/manage" name="deliverInfoForm" scope="request" parameter="method">
</action>
<!-- 订单信息确认 -->
<action path="/customer/shopping/confirm" name="deliverInfoForm" scope="request">
<forward name="confirm" path="/WEB-INF/page/shopping/confirm.jsp"/>
</action>
<!-- 订单提交结果页面 -->
<action path="/shopping/finish" name="shoppingFinishForm" scope="request">
<forward name="postofficeremittance" path="/WEB-INF/page/shopping/finish_postofficeremittance.jsp"/>
<forward name="cod" path="/WEB-INF/page/shopping/finish_cod.jsp"/>
<forward name="net" path="/WEB-INF/page/shopping/finish_net.jsp"/>
<forward name="bank" path="/WEB-INF/page/shopping/finish_bankremittance.jsp"/>
</action>
<!-- 产品查询 -->
<action path="/product/query" name="productQueryForm" scope="request">
<forward name="list" path="/WEB-INF/page/product/frontpage/queryproductlist.jsp"/>
</action>
<!-- 找回密码第一步 -->
<action path="/user/findpassword" forward="/WEB-INF/page/user/findPassword.jsp" />
<!-- 找回密码之发送邮件及更新密码 -->
<action path="/user/post" name="buyerForm" scope="request" parameter="method">
<forward name="inputusername" path="/WEB-INF/page/user/findPassword.jsp" />
<forward name="info" path="/WEB-INF/page/user/findPassword2.jsp" />
<forward name="inputpassword" path="/WEB-INF/page/user/findPassword3.jsp" />
<forward name="errorresult" path="/WEB-INF/page/user/errorresult.jsp" />
</action>
</action-mappings>
<controller>
<set-property property="processorClass" value="cn.xxx.web.action.privilege.PrivilegeRequestProcessor"/>
</controller>
</struts-config>
---------------------------------------------------------------
<?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>babasport</display-name>
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>classpath:beans.xml</param-value>
</context-param>
<!-- 对Spring容器进行实例化 -->
<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>
<filter>
<filter-name>CacheFilter</filter-name>
<filter-class>com.opensymphony.oscache.web.filter.CacheFilter</filter-class>
<init-param>
<param-name>time</param-name>
<param-value>7200</param-value>
</init-param>
<init-param>
<param-name>scope</param-name>
<param-value>application</param-value>
</init-param>
</filter>
<filter-mapping>
<filter-name>CacheFilter</filter-name>
<url-pattern>/product/list/*</url-pattern>
</filter-mapping>
<filter>
<filter-name>Spring OpenEntityManagerInViewFilter</filter-name>
<filter-class>org.springframework.orm.jpa.support.OpenEntityManagerInViewFilter</filter-class>
<init-param>
<!-- 指定org.springframework.orm.jpa.LocalEntityManagerFactoryBean在spring配置文件中的名称,默认值为entityManagerFactory
如果LocalEntityManagerFactoryBean在spring中的名称不是entityManagerFactory,该参数一定要指定,否则会出现找不到entityManagerFactory的例外 -->
<param-name>entityManagerFactoryBeanName</param-name>
<param-value>entityManagerFactory</param-value>
</init-param>
</filter>
<filter-mapping>
<filter-name>Spring OpenEntityManagerInViewFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<!-- 验证用户是否登录 -->
<filter>
<filter-name>BuyerLogonFilter</filter-name>
<filter-class>cn.xxx.web.filter.BuyerLogonFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>BuyerLogonFilter</filter-name>
<url-pattern>/customer/*</url-pattern>
</filter-mapping>
<!-- 验证购物车是否存在商品 -->
<filter>
<filter-name>BuyCartFilter</filter-name>
<filter-class>cn.xxx.web.filter.BuyCartFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>BuyCartFilter</filter-name>
<url-pattern>/customer/shopping/*</url-pattern>
</filter-mapping>
<filter>
<filter-name>codeFilter</filter-name>
<filter-class>cn.xxx.web.filter.SetCodeFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>codeFilter</filter-name>
<url-pattern>*.do</url-pattern>
</filter-mapping>
<filter-mapping>
<filter-name>codeFilter</filter-name>
<url-pattern>*.jsp</url-pattern>
</filter-mapping>
<filter>
<filter-name>EmployeeFilter</filter-name>
<filter-class>cn.xxx.web.filter.EmployeeFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>EmployeeFilter</filter-name>
<url-pattern>/control/*</url-pattern>
</filter-mapping>
<servlet>
<servlet-name>struts</servlet-name>
<servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
<init-param>
<param-name>config</param-name>
<param-value>/WEB-INF/struts-config.xml</param-value>
</init-param>
</servlet>
<servlet-mapping>
<servlet-name>struts</servlet-name>
<url-pattern>*.do</url-pattern>
</servlet-mapping>
<welcome-file-list>
<welcome-file>index.html</welcome-file>
<welcome-file>index.jsp</welcome-file>
</welcome-file-list>
</web-app>
--------------------------------------------------------------