Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit b804550

Browse files
author
epam3_norkin_mark
committed
format web.xml
1 parent fd6e87f commit b804550

File tree

1 file changed

+74
-64
lines changed

1 file changed

+74
-64
lines changed

WebContent/WEB-INF/web.xml

Lines changed: 74 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -1,50 +1,61 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<!--Deployment Descriptor web.xml -->
3-
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" id="WebApp_ID" version="2.5">
4-
<resource-ref>
5-
<description>Database for university admission</description>
6-
<res-ref-name>jdbc/SummaryTask4</res-ref-name>
7-
<res-type>javax.sql.DataSource</res-type>
8-
<res-auth>Container</res-auth>
9-
</resource-ref>
3+
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4+
xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee"
5+
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
6+
id="WebApp_ID" version="2.5">
7+
<resource-ref>
8+
<description>Database for university admission</description>
9+
<res-ref-name>jdbc/SummaryTask4</res-ref-name>
10+
<res-type>javax.sql.DataSource</res-type>
11+
<res-auth>Container</res-auth>
12+
</resource-ref>
1013

11-
<display-name>SummaryTask4</display-name>
14+
<resource-ref>
15+
<description>University admission mail</description>
16+
<res-ref-name>mail/Session</res-ref-name>
17+
<res-type>javax.mail.Session</res-type>
18+
<res-auth>Container</res-auth>
19+
<res-sharing-scope>Shareable</res-sharing-scope>
20+
</resource-ref>
1221

13-
<welcome-file-list>
14-
<welcome-file>welcome.jsp</welcome-file>
15-
</welcome-file-list>
22+
<display-name>SummaryTask4</display-name>
1623

17-
<!-- Custom tag used in applying for faculty form-->
18-
<jsp-config>
19-
<taglib>
20-
<taglib-uri>/WEB-INF/customtag</taglib-uri>
21-
<taglib-location>/WEB-INF/customtag.tld</taglib-location>
22-
</taglib>
23-
</jsp-config>
24+
<welcome-file-list>
25+
<welcome-file>welcome.jsp</welcome-file>
26+
</welcome-file-list>
2427

25-
<!--============================================================
26-
i18n support
27-
=============================================================-->
28-
<!-- set the resource bundle name -->
29-
<context-param>
30-
<param-name>javax.servlet.jsp.jstl.fmt.localizationContext</param-name>
31-
<param-value>resources</param-value>
32-
</context-param>
28+
<!-- Custom tag used in applying for faculty form -->
29+
<jsp-config>
30+
<taglib>
31+
<taglib-uri>/WEB-INF/customtag</taglib-uri>
32+
<taglib-location>/WEB-INF/customtag.tld</taglib-location>
33+
</taglib>
34+
</jsp-config>
3335

34-
<!--set the default locale (optional) -->
35-
<!-- the (preferable) browser's locale will be used if we don't set the default locale -->
36-
<context-param>
37-
<param-name>javax.servlet.jsp.jstl.fmt.locale</param-name>
38-
<param-value>ru</param-value>
39-
</context-param>
36+
<!--============================================================ i18n support
37+
============================================================= -->
38+
<!-- set the resource bundle name -->
39+
<context-param>
40+
<param-name>javax.servlet.jsp.jstl.fmt.localizationContext</param-name>
41+
<param-value>resources</param-value>
42+
</context-param>
4043

41-
<!-- supported locales -->
42-
<context-param>
43-
<param-name>locales</param-name>
44-
<param-value>ru en</param-value>
45-
</context-param>
44+
<!--set the default locale (optional) -->
45+
<!-- the (preferable) browser's locale will be used if we don't set the
46+
default locale -->
47+
<context-param>
48+
<param-name>javax.servlet.jsp.jstl.fmt.locale</param-name>
49+
<param-value>ru</param-value>
50+
</context-param>
4651

47-
<servlet>
52+
<!-- supported locales -->
53+
<context-param>
54+
<param-name>locales</param-name>
55+
<param-value>ru en</param-value>
56+
</context-param>
57+
58+
<servlet>
4859
<servlet-name>FrontController</servlet-name>
4960
<servlet-class>ua.nure.norkin.SummaryTask4.FrontController</servlet-class>
5061
</servlet>
@@ -54,7 +65,7 @@
5465
<url-pattern>/controller</url-pattern>
5566
</servlet-mapping>
5667

57-
<filter>
68+
<filter>
5869
<filter-name>EncodingFilter</filter-name>
5970
<filter-class>ua.nure.norkin.SummaryTask4.filter.EncodingFilter</filter-class>
6071
<init-param>
@@ -69,30 +80,29 @@
6980
<servlet-name>Controller</servlet-name>
7081
</filter-mapping>
7182

72-
<filter>
73-
<filter-name>AuthFilter</filter-name>
74-
<filter-class>
75-
ua.nure.norkin.SummaryTask4.filter.AuthFilter
76-
</filter-class>
77-
<init-param>
78-
<param-name>avoid-urls</param-name>
79-
<param-value>welcome.jsp</param-value>
80-
</init-param>
81-
</filter>
82-
<filter-mapping>
83-
<filter-name>AuthFilter</filter-name>
84-
<servlet-name>FrontController</servlet-name>
85-
</filter-mapping>
83+
<filter>
84+
<filter-name>AuthFilter</filter-name>
85+
<filter-class>ua.nure.norkin.SummaryTask4.filter.AuthFilter</filter-class>
86+
<init-param>
87+
<param-name>avoid-urls</param-name>
88+
<param-value>welcome.jsp</param-value>
89+
</init-param>
90+
</filter>
91+
92+
<filter-mapping>
93+
<filter-name>AuthFilter</filter-name>
94+
<servlet-name>FrontController</servlet-name>
95+
</filter-mapping>
8696

87-
<listener>
88-
<listener-class>ua.nure.norkin.SummaryTask4.listener.ContextListener</listener-class>
89-
</listener>
90-
<error-page>
91-
<exception-type>java.lang.Throwable</exception-type>
92-
<location>/WEB-INF/view/errorPage.jsp</location>
93-
</error-page>
94-
<error-page>
95-
<error-code>404</error-code>
96-
<location>/WEB-INF/view/errorPage.jsp</location>
97-
</error-page>
97+
<listener>
98+
<listener-class>ua.nure.norkin.SummaryTask4.listener.ContextListener</listener-class>
99+
</listener>
100+
<error-page>
101+
<exception-type>java.lang.Throwable</exception-type>
102+
<location>/WEB-INF/view/errorPage.jsp</location>
103+
</error-page>
104+
<error-page>
105+
<error-code>404</error-code>
106+
<location>/WEB-INF/view/errorPage.jsp</location>
107+
</error-page>
98108
</web-app>

0 commit comments

Comments
 (0)