web.xml
4.23 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
<?xml version="1.0" encoding="UTF-8" ?>
<web-app 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
">
<context-param>
<param-name>kissoConfigLocation</param-name>
<!-- FIXME : 步骤2使用的文件名 -->
<param-value>classpath:config.properties</param-value>
</context-param>
<listener>
<listener-class>com.xiniunet.supporting.sso.web.KissoConfigListener</listener-class>
</listener>
<filter>
<filter-name>sso</filter-name>
<filter-class>com.xiniunet.supporting.sso.web.filter.SSOFilter</filter-class>
<init-param>
<param-name>over.url</param-name>
<param-value>*.css;*.js;*.ttf;*.TTF;*.jpg;*.gif;*.png;*.ico;*.woff;test.html;*/mobile*;/common.do;*/api/*;*method*;
</param-value>
</init-param>
<init-param>
<param-name>over.type</param-name>
<param-value>CONTAINS</param-value>
</init-param>
</filter>
<filter-mapping>
<filter-name>sso</filter-name>
<url-pattern>/admin/*</url-pattern>
</filter-mapping>
<filter-mapping>
<filter-name>sso</filter-name>
<url-pattern>/sso/*</url-pattern>
</filter-mapping>
<!-- 初始化日志系统 -->
<listener>
<listener-class>com.alibaba.citrus.logconfig.LogConfiguratorListener</listener-class>
</listener>
<!-- 装载/WEB-INF/webx.xml, /WEB-INF/webx-*.xml -->
<listener>
<listener-class>com.alibaba.citrus.webx.context.WebxContextLoaderListener</listener-class>
</listener>
<filter>
<filter-name>role</filter-name>
<filter-class>com.xiniunet.web.filter.Authorizations</filter-class>
</filter>
<filter-mapping>
<filter-name>role</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<filter>
<filter-name>log</filter-name>
<filter-class>com.xiniunet.web.filter.LogFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>log</filter-name>
<url-pattern>*.htm</url-pattern>
</filter-mapping>
<filter>
<filter-name>mdc</filter-name>
<filter-class>com.alibaba.citrus.webx.servlet.SetLoggingContextFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>mdc</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<filter>
<filter-name>webx</filter-name>
<filter-class>com.alibaba.citrus.webx.servlet.WebxFrameworkFilter</filter-class>
<init-param>
<param-name>excludes</param-name>
<param-value>/router<!-- 需要被“排除”的URL路径,以逗号分隔,如/static, *.jpg。适合于映射静态页面、图片。 --></param-value>
</init-param>
<init-param>
<param-name>passthru</param-name>
<param-value><!-- 需要被“略过”的URL路径,以逗号分隔,如/myservlet, *.jsp。适用于映射servlet、filter。
对于passthru请求,webx的request-contexts服务、错误处理、开发模式等服务仍然可用。 --></param-value>
</init-param>
</filter>
<filter-mapping>
<filter-name>webx</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<error-page>
<error-code>401</error-code>
<location>/401.html</location>
</error-page>
<error-page>
<error-code>403</error-code>
<location>/403.html</location>
</error-page>
<error-page>
<error-code>404</error-code>
<location>/404.html</location>
</error-page>
<error-page>
<error-code>500</error-code>
<location>/500.html</location>
</error-page>
<servlet>
<servlet-name>xiniuapi</servlet-name>
<servlet-class>com.xiniunet.apiframework.ApiServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>xiniuapi</servlet-name>
<url-pattern>/router</url-pattern>
</servlet-mapping>
<welcome-file-list>
<welcome-file>index.htm</welcome-file>
</welcome-file-list>
</web-app>