web.xml 2.87 KB
Newer Older
Matija Obreza's avatar
Matija Obreza committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
<?xml version="1.0" encoding="UTF-8"?>
<web-app 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"
         version="2.5">

    <context-param>
        <param-name>contextConfigLocation</param-name>
        <param-value>classpath:spring/spring-*.xml</param-value>
    </context-param>

    <listener>
        <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
    </listener>
    <listener>
        <listener-class>org.springframework.web.context.request.RequestContextListener</listener-class>
    </listener>

Matija Obreza's avatar
Matija Obreza committed
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
	<filter>
		<filter-name>encodingFilter</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>encodingFilter</filter-name>
		<url-pattern>/*</url-pattern>
	</filter-mapping>

Matija Obreza's avatar
Matija Obreza committed
37
38
39
40
41
42
43
44
    <filter>
        <filter-name>org.springframework.security.filterChainProxy</filter-name>
        <filter-class>org.springframework.web.filter.DelegatingFilterProxy</filter-class>
    </filter>
    <filter-mapping>
        <filter-name>org.springframework.security.filterChainProxy</filter-name>
        <url-pattern>/*</url-pattern>
    </filter-mapping>
Matija Obreza's avatar
Matija Obreza committed
45
46
47
48
49
50
51
52
53
	
	<filter>
		<filter-name>sitemesh</filter-name>
		<filter-class>org.sitemesh.config.ConfigurableSiteMeshFilter</filter-class>
	</filter>
	<filter-mapping>
		<filter-name>sitemesh</filter-name>
		<url-pattern>/*</url-pattern>
	</filter-mapping>
Matija Obreza's avatar
Matija Obreza committed
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

    <servlet>
        <servlet-name>mvc</servlet-name>
        <servlet-class>
            org.springframework.web.servlet.DispatcherServlet
        </servlet-class>
        <init-param>
            <param-name>contextConfigLocation</param-name>
            <param-value>classpath:/servlet/auth-servlet.xml</param-value>
        </init-param>
        <load-on-startup>1</load-on-startup>
    </servlet>

    <servlet-mapping>
        <servlet-name>mvc</servlet-name>
        <url-pattern>/</url-pattern>
    </servlet-mapping>

    <welcome-file-list>
        <welcome-file>/index.html</welcome-file>
    </welcome-file-list>

    <error-page>
        <error-code>404</error-code>
        <location>/WEB-INF/jsp/404.jsp</location>
    </error-page>
Matija Obreza's avatar
Layouts    
Matija Obreza committed
80
81
    <error-page>  
		<error-code>500</error-code>  
82
		<location>/WEB-INF/jsp/500.jsp</location>  
Matija Obreza's avatar
Layouts    
Matija Obreza committed
83
	</error-page> 
Matija Obreza's avatar
Updates    
Matija Obreza committed
84
    <session-config>
Matija Obreza's avatar
Matija Obreza committed
85
86
87
        <session-timeout>30</session-timeout>
    </session-config>

Matija Obreza's avatar
Matija Obreza committed
88
89
90
91
92
93
	<jsp-config>
	    <jsp-property-group>
	        <url-pattern>*.jsp</url-pattern>
	        <page-encoding>UTF-8</page-encoding>
	    </jsp-property-group>
	</jsp-config>
Matija Obreza's avatar
Matija Obreza committed
94
</web-app>