Advertisement
Javi

Spring web.xml configuration

Feb 28th, 2012
177
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
XML 2.30 KB | None | 0 0
  1.  
  2. <?xml version="1.0" encoding="UTF-8"?>
  3. <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">
  4.     <context-param>
  5.         <param-name>log4jConfigLocation</param-name>
  6.         <param-value>/WEB-INF/log4j.properties</param-value>
  7.     </context-param>
  8.     <listener>
  9.         <listener-class>
  10.             org.springframework.web.util.Log4jConfigListener
  11.         </listener-class>
  12.     </listener>
  13.     <!-- Spring MVC -->
  14.     <context-param>
  15.         <param-name>contextConfigLocation</param-name>
  16.         <param-value>
  17.             <!--classpath:*Context.xml-->
  18.             /WEB-INF/applicationContext.xml
  19.         </param-value>
  20.     </context-param>
  21.     <listener>
  22.         <listener-class>
  23.             org.springframework.web.context.ContextLoaderListener
  24.         </listener-class>
  25.     </listener>
  26.     <!--
  27.    <servlet>
  28.        <servlet-name>MVC</servlet-name>
  29.        <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
  30.        <load-on-startup>1</load-on-startup>
  31.    </servlet>
  32.    <servlet-mapping>
  33.        <servlet-name>MVC</servlet-name>
  34.        <url-pattern>*.xhtml</url-pattern>
  35.    </servlet-mapping>
  36.    <servlet-mapping>
  37.        <servlet-name>MVC</servlet-name>
  38.        <url-pattern>/rest/*</url-pattern>
  39.    </servlet-mapping>
  40.    -->
  41.     <session-config>
  42.         <session-timeout>
  43.             30
  44.         </session-timeout>
  45.     </session-config>
  46.     <welcome-file-list>
  47.         <welcome-file>index.jsp</welcome-file>
  48.     </welcome-file-list>
  49.     <!--
  50.    <security-constraint>
  51.        <display-name>rest services</display-name>
  52.        <web-resource-collection>
  53.            <web-resource-name>RestServices</web-resource-name>
  54.            <description/>
  55.            <url-pattern>/rest/*</url-pattern>
  56.        </web-resource-collection>
  57.        <auth-constraint>
  58.            <description/>
  59.            <role-name>chief</role-name>
  60.        </auth-constraint>
  61.    </security-constraint>
  62.    <login-config>
  63.        <auth-method>BASIC</auth-method>
  64.    </login-config>
  65.    <security-role>
  66.        <description/>
  67.        <role-name>chief</role-name>
  68.    </security-role>
  69.    -->
  70. </web-app>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement