Skip to content

Commit

Permalink
servlet: Adapt web.xml to standard so that tomcat can run it
Browse files Browse the repository at this point in the history
  • Loading branch information
tgrabiec committed Nov 21, 2013
1 parent 058c36f commit 45dc36a
Showing 1 changed file with 33 additions and 15 deletions.
48 changes: 33 additions & 15 deletions servlet/src/main/webapp/WEB-INF/web.xml
Original file line number Diff line number Diff line change
@@ -1,44 +1,62 @@
<web-app>
<web-app version="3.0"
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_3_0.xsd">
<servlet>
<servlet-name>json</servlet-name>
<servlet-class>hello.JsonServlet</servlet-class>
<load-on-startup/>
</servlet>
<servlet-mapping url-regexp='^/json$' servlet-name='json'/>
<servlet-mapping>
<servlet-name>json</servlet-name>
<url-pattern>/json</url-pattern>
</servlet-mapping>
<servlet>
<servlet-name>plaintext</servlet-name>
<servlet-class>hello.PlaintextServlet</servlet-class>
<load-on-startup/>
</servlet>
<servlet-mapping url-regexp='^/plaintext$' servlet-name='plaintext'/>
<servlet-mapping>
<servlet-name>plaintext</servlet-name>
<url-pattern>/plaintext</url-pattern>
</servlet-mapping>
<servlet>
<servlet-name>db</servlet-name>
<servlet-class>hello.DbPoolServlet</servlet-class>
<load-on-startup/>
</servlet>
<servlet-mapping url-regexp='^/db$' servlet-name='db'/>
<servlet-mapping>
<servlet-name>db</servlet-name>
<url-pattern>/db</url-pattern>
</servlet-mapping>
<servlet>
<servlet-name>fortunes</servlet-name>
<servlet-class>hello.FortunesServlet</servlet-class>
<load-on-startup/>
</servlet>
<servlet-mapping url-regexp='^/fortunes$' servlet-name='fortunes'/>
<servlet-mapping>
<servlet-name>fortunes</servlet-name>
<url-pattern>/fortunes</url-pattern>
</servlet-mapping>
<servlet>
<servlet-name>update</servlet-name>
<servlet-class>hello.UpdateServlet</servlet-class>
<load-on-startup/>
</servlet>
<servlet-mapping url-regexp='^/update$' servlet-name='update'/>
<servlet-mapping>
<servlet-name>update</servlet-name>
<url-pattern>/update</url-pattern>
</servlet-mapping>
<servlet>
<servlet-name>postgres</servlet-name>
<servlet-class>hello.PostgresServlet</servlet-class>
<load-on-startup/>
</servlet>
<servlet-mapping url-regexp='^/postgres$' servlet-name='postgres'/>
<servlet-mapping>
<servlet-name>postgres</servlet-name>
<url-pattern>/postgres</url-pattern>
</servlet-mapping>
<servlet>
<servlet-name>postgres-update</servlet-name>
<servlet-class>hello.PostgresUpdateServlet</servlet-class>
<load-on-startup/>
</servlet>
<servlet-mapping url-regexp='^/postgres-update$' servlet-name='postgres-update'/>
<servlet-mapping>
<servlet-name>postgres-update</servlet-name>
<url-pattern>/postgres-update</url-pattern>
</servlet-mapping>
</web-app>

0 comments on commit 45dc36a

Please sign in to comment.