|
@@ -7,183 +7,11 @@
|
|
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
|
|
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
|
|
version="2.4">
|
|
version="2.4">
|
|
|
|
|
|
- <display-name>MaxKey security</display-name>
|
|
|
|
|
|
+ <display-name>MaxKey Single Sign On</display-name>
|
|
<!-- webAppRootKey -->
|
|
<!-- webAppRootKey -->
|
|
<context-param>
|
|
<context-param>
|
|
<param-name>webAppRootKey</param-name>
|
|
<param-name>webAppRootKey</param-name>
|
|
<param-value>org.maxkey.root</param-value>
|
|
<param-value>org.maxkey.root</param-value>
|
|
</context-param>
|
|
</context-param>
|
|
|
|
|
|
- <servlet>
|
|
|
|
- <servlet-name>InitWebContext</servlet-name>
|
|
|
|
- <servlet-class>org.maxkey.web.InitWebContext</servlet-class>
|
|
|
|
- <load-on-startup>1</load-on-startup>
|
|
|
|
- </servlet>
|
|
|
|
- <!--
|
|
|
|
- <servlet-mapping>
|
|
|
|
- <servlet-name>InitWebContext</servlet-name>
|
|
|
|
- <url-pattern>/</url-pattern>
|
|
|
|
- </servlet-mapping> -->
|
|
|
|
-
|
|
|
|
- <!-- contextConfigLocation -->
|
|
|
|
- <context-param>
|
|
|
|
- <param-name>contextConfigLocation</param-name>
|
|
|
|
- <param-value>/WEB-INF/spring/maxkey.xml</param-value>
|
|
|
|
- </context-param>
|
|
|
|
-
|
|
|
|
- <!-- log4jConfigLocation
|
|
|
|
- <context-param>
|
|
|
|
- <param-name>log4jConfigLocation</param-name>
|
|
|
|
- <param-value>classpath:log4j.properties</param-value>
|
|
|
|
- </context-param> -->
|
|
|
|
- <context-param>
|
|
|
|
- <param-name>log4jRefreshInterval</param-name>
|
|
|
|
- <param-value>60000</param-value>
|
|
|
|
- </context-param>
|
|
|
|
- <!-- listeners
|
|
|
|
- <listener>
|
|
|
|
- <listener-class>org.springframework.web.util.Log4jConfigListener</listener-class>
|
|
|
|
- </listener>-->
|
|
|
|
- <listener>
|
|
|
|
- <listener-class>org.springframework.web.context.request.RequestContextListener</listener-class>
|
|
|
|
- </listener>
|
|
|
|
- <listener>
|
|
|
|
- <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
|
|
|
|
- </listener>
|
|
|
|
- <listener>
|
|
|
|
- <listener-class>org.springframework.web.util.IntrospectorCleanupListener</listener-class>
|
|
|
|
- </listener>
|
|
|
|
-
|
|
|
|
- <!-- log4j -->
|
|
|
|
- <context-param>
|
|
|
|
- <param-name>isLog4jAutoInitializationDisabled</param-name>
|
|
|
|
- <param-value>false</param-value>
|
|
|
|
- </context-param>
|
|
|
|
- <!-- 默认就会找这个文件,不需要额外配置引用 -->
|
|
|
|
- <context-param>
|
|
|
|
- <param-name>log4jConfiguration</param-name>
|
|
|
|
- <param-value>classpath:log4j2.xml</param-value>
|
|
|
|
- </context-param>
|
|
|
|
-
|
|
|
|
- <!-- 在WEB项目中使用log4j2需要在web.xml文件中配置如下的监听器和过滤器 -->
|
|
|
|
- <listener>
|
|
|
|
- <listener-class>org.apache.logging.log4j.web.Log4jServletContextListener</listener-class>
|
|
|
|
- </listener>
|
|
|
|
-
|
|
|
|
- <filter>
|
|
|
|
- <filter-name>log4jServletFilter</filter-name>
|
|
|
|
- <filter-class>org.apache.logging.log4j.web.Log4jServletFilter</filter-class>
|
|
|
|
- </filter>
|
|
|
|
- <filter-mapping>
|
|
|
|
- <filter-name>log4jServletFilter</filter-name>
|
|
|
|
- <url-pattern>/*</url-pattern>
|
|
|
|
- <dispatcher>REQUEST</dispatcher>
|
|
|
|
- <dispatcher>FORWARD</dispatcher>
|
|
|
|
- <dispatcher>INCLUDE</dispatcher>
|
|
|
|
- <dispatcher>ERROR</dispatcher>
|
|
|
|
- </filter-mapping>
|
|
|
|
- <!-- CharacterEncodingFilter -->
|
|
|
|
- <filter>
|
|
|
|
- <filter-name>characterEncodingFilter</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>
|
|
|
|
- <filter-mapping>
|
|
|
|
- <filter-name>characterEncodingFilter</filter-name>
|
|
|
|
- <url-pattern>/*</url-pattern>
|
|
|
|
- </filter-mapping>
|
|
|
|
-
|
|
|
|
- <!-- IpAddressFilter -->
|
|
|
|
- <filter>
|
|
|
|
- <filter-name>ipAddressFilter</filter-name>
|
|
|
|
- <filter-class>org.maxkey.web.filter.IpAddressFilter</filter-class>
|
|
|
|
- </filter>
|
|
|
|
- <filter-mapping>
|
|
|
|
- <filter-name>ipAddressFilter</filter-name>
|
|
|
|
- <url-pattern>/*</url-pattern>
|
|
|
|
- </filter-mapping>
|
|
|
|
-
|
|
|
|
-
|
|
|
|
- <filter>
|
|
|
|
- <filter-name>OAuth20TokenEndpointAuthenticationFilter</filter-name>
|
|
|
|
- <filter-class>org.maxkey.authz.oauth2.provider.endpoint.TokenEndpointAuthenticationFilter</filter-class>
|
|
|
|
- </filter>
|
|
|
|
- <filter-mapping>
|
|
|
|
- <filter-name>OAuth20TokenEndpointAuthenticationFilter</filter-name>
|
|
|
|
- <url-pattern>/oauth/v20/token</url-pattern>
|
|
|
|
- </filter-mapping>
|
|
|
|
-
|
|
|
|
- <!-- DispatcherServlet Spring MVC -->
|
|
|
|
- <servlet>
|
|
|
|
- <servlet-name>maxkey</servlet-name>
|
|
|
|
- <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
|
|
|
|
- <load-on-startup>1</load-on-startup>
|
|
|
|
- </servlet>
|
|
|
|
- <servlet-mapping>
|
|
|
|
- <servlet-name>maxkey</servlet-name>
|
|
|
|
- <url-pattern>/</url-pattern>
|
|
|
|
- </servlet-mapping>
|
|
|
|
- <filter>
|
|
|
|
- <filter-name>HiddenHttpMethodFilter</filter-name>
|
|
|
|
- <filter-class>org.springframework.web.filter.HiddenHttpMethodFilter</filter-class>
|
|
|
|
- </filter>
|
|
|
|
- <filter-mapping>
|
|
|
|
- <filter-name>HiddenHttpMethodFilter</filter-name>
|
|
|
|
- <servlet-name>maxkey</servlet-name>
|
|
|
|
- </filter-mapping>
|
|
|
|
-
|
|
|
|
- <!-- default session timeout 30 minutes -->
|
|
|
|
- <session-config>
|
|
|
|
- <session-timeout>30</session-timeout>
|
|
|
|
- </session-config>
|
|
|
|
-
|
|
|
|
- <!--Error page config -->
|
|
|
|
- <error-page>
|
|
|
|
- <error-code>401</error-code>
|
|
|
|
- <location>/WEB-INF/view/exception/accessdeny.jsp</location>
|
|
|
|
- </error-page>
|
|
|
|
-
|
|
|
|
- <error-page>
|
|
|
|
- <error-code>403</error-code>
|
|
|
|
- <location>/WEB-INF/view/exception/accessdeny.jsp</location>
|
|
|
|
- </error-page>
|
|
|
|
-
|
|
|
|
- <error-page>
|
|
|
|
- <error-code>404</error-code>
|
|
|
|
- <location>/WEB-INF/view/exception/404.jsp</location>
|
|
|
|
- </error-page>
|
|
|
|
-
|
|
|
|
- <error-page>
|
|
|
|
- <error-code>500</error-code>
|
|
|
|
- <location>/WEB-INF/view/exception/500.jsp</location>
|
|
|
|
- </error-page>
|
|
|
|
-
|
|
|
|
- <error-page>
|
|
|
|
- <error-code>501</error-code>
|
|
|
|
- <location>/WEB-INF/view/exception/501.jsp</location>
|
|
|
|
- </error-page>
|
|
|
|
-
|
|
|
|
- <error-page>
|
|
|
|
- <error-code>503</error-code>
|
|
|
|
- <location>/WEB-INF/view/exception/503.jsp</location>
|
|
|
|
- </error-page>
|
|
|
|
-
|
|
|
|
- <!--used jsp Tag -->
|
|
|
|
- <jsp-config>
|
|
|
|
- <taglib>
|
|
|
|
- <taglib-uri>http://sso.maxkey.org/tags</taglib-uri>
|
|
|
|
- <taglib-location>/WEB-INF/tags/maxkeyTag.tld</taglib-location>
|
|
|
|
- </taglib>
|
|
|
|
- <taglib>
|
|
|
|
- <taglib-uri>http://java.sun.com/jsp/jstl/core</taglib-uri>
|
|
|
|
- <taglib-location>/WEB-INF/tags/c.tld</taglib-location>
|
|
|
|
- </taglib>
|
|
|
|
- </jsp-config>
|
|
|
|
</web-app>
|
|
</web-app>
|