web.xml
4.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
<?xml version="1.0" encoding="UTF-8"?>
<web-app version="2.5"
xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
<!-- 配置过滤器,校验用户是否登录 -->
<filter>
<filter-name>UserSessionIntercept</filter-name>
<filter-class>com.espeed.intercept.UserSessionIntercept</filter-class>
</filter>
<filter-mapping>
<filter-name>UserSessionIntercept</filter-name>
<url-pattern>*.jsp</url-pattern>
<url-pattern>*.action</url-pattern>
</filter-mapping>
<session-config>
<session-timeout>180</session-timeout>
</session-config>
<welcome-file-list>
<welcome-file>index.jsp</welcome-file>
</welcome-file-list>
<filter>
<filter-name>openSessionInView</filter-name>
<filter-class>org.springframework.orm.hibernate3.support.OpenSessionInViewFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>openSessionInView</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<!-- 文件上传servlet -->
<servlet>
<servlet-name>FileUploadServlet</servlet-name>
<servlet-class>com.espeed.servlet.uploadFile</servlet-class>
<init-param>
<param-name>fileSizeLimit</param-name>
<param-value>1024</param-value>
</init-param>
</servlet>
<servlet>
<servlet-name>DeleteFileServlet</servlet-name>
<servlet-class>com.espeed.servlet.DeleteFile</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>FileUploadServlet</servlet-name>
<url-pattern>/FileUploadServlet</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>DeleteFileServlet</servlet-name>
<url-pattern>/DeleteFileServlet</url-pattern>
</servlet-mapping>
<!-- 配置spring监听器 -->
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>classpath:applicationContext.xml</param-value>
</context-param>
<listener>
<listener-class>
org.springframework.web.context.ContextLoaderListener
</listener-class>
</listener>
<!-- Spring乱码处理 -->
<filter>
<filter-name>characterEncoding</filter-name>
<filter-class>org.springframework.web.filter.CharacterEncodingFilter</filter-class>
<init-param>
<param-name>encoding</param-name>
<param-value>UTF-8</param-value>
</init-param>
<init-param>
<param-name>forceEncoding</param-name>
<param-value>true</param-value>
</init-param>
</filter>
<!-- struts2启动配置 -->
<filter>
<filter-name>struts2</filter-name>
<filter-class>org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>characterEncoding</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<filter-mapping>
<filter-name>struts2</filter-name>
<url-pattern>*.action</url-pattern>
</filter-mapping>
<filter-mapping>
<filter-name>struts2</filter-name>
<url-pattern>/marketing/*</url-pattern>
</filter-mapping>
<filter-mapping>
<filter-name>openSessionInView</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<servlet>
<servlet-name>CXFServlet</servlet-name>
<servlet-class>
org.apache.cxf.transport.servlet.CXFServlet
</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>CXFServlet</servlet-name>
<url-pattern>/webServices/*</url-pattern>
</servlet-mapping>
<!-- 计划提醒功能servlet -->
<servlet>
<servlet-name>plansocket</servlet-name>
<servlet-class>com.espeed.socket.EchoServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>plansocket</servlet-name>
<url-pattern>/plansocket</url-pattern>
</servlet-mapping>
<!-- 已发邮件servlet -->
<servlet>
<servlet-name>mailmasterservlet</servlet-name>
<servlet-class>com.espeed.servlet.YxySendMailMasterServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>mailmasterservlet</servlet-name>
<url-pattern>/mailmasterservlet</url-pattern>
</servlet-mapping>
</web-app>