Tomcat连接池配置示例文件
web.xml
<?xml version="1.0" encoding="UTF-8"?>
<web-app version="2.4"
xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
<filter>
<filter-name>Set Character Encoding</filter-name>
<filter-class>huc.blog.util.SetCharacterEncodingFilter</filter-class>
<init-param>
<param-name>encoding</param-name>
<param-value>UTF-8</param-value>
</init-param>
</filter>
<filter-mapping>
<filter-name>Set Character Encoding</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<servlet>
<description>do reg</description>
<display-name>do reg</display-name>
<servlet-name>DoReg</servlet-name>
<servlet-class>huc.blog.servlet.DoReg</servlet-class>
</servlet>
<servlet>
<description>do login</description>
<display-name>do login</display-name>
<servlet-name>DoLogin</servlet-name>
<servlet-class>huc.blog.servlet.DoLogin</servlet-class>
</servlet>
<servlet>
<description>show index</description>
<display-name>show index</display-name>
<servlet-name>ShowIndex</servlet-name>
<servlet-class>huc.blog.servlet.ShowIndex</servlet-class>
</servlet>
<servlet>
<description>show space</description>
<display-name>show space</display-name>
<servlet-name>ShowSpace</servlet-name>
<servlet-class>huc.blog.servlet.ShowSpace</servlet-class>
</servlet>
<servlet>
<description>show blog</description>
<display-name>show blog</display-name>
<servlet-name>ShowBlog</servlet-name>
<servlet-class>huc.blog.servlet.ShowBlog</servlet-class>
</servlet>
<servlet>
<description>list blog</description>
<display-name>list blog</display-name>
<servlet-name>BlogList</servlet-name>
<servlet-class>huc.blog.servlet.BlogList</servlet-class>
</servlet>
<servlet>
<description>show profile</description>
<display-name>show profile</display-name>
<servlet-name>ShowProfile</servlet-name>
<servlet-class>huc.blog.servlet.ShowProfile</servlet-class>
</servlet>
<servlet>
<servlet-name>ManageBlog</servlet-name>
<servlet-class>huc.blog.servlet.ManageBlog</servlet-class>
</servlet>
<servlet>
<servlet-name>ShowRemark</servlet-name>
<servlet-class>huc.blog.servlet.ShowRemark</servlet-class>
</servlet>
<servlet>
<servlet-name>UserList</servlet-name>
<servlet-class>huc.blog.servlet.UserList</servlet-class>
</servlet>
<servlet>
<servlet-name>RemarkList</servlet-name>
<servlet-class>huc.blog.servlet.RemarkList</servlet-class>
</servlet>
<servlet>
<servlet-name>ManageRemark</servlet-name>
<servlet-class>huc.blog.servlet.ManageRemark</servlet-class>
</servlet>
<servlet>
<servlet-name>ManageCategory</servlet-name>
<servlet-class>huc.blog.servlet.ManageCategory</servlet-class>
</servlet>
<servlet>
<servlet-name>DoLogout</servlet-name>
<servlet-class>huc.blog.servlet.DoLogout</servlet-class>
</servlet>
<servlet>
<servlet-name>Upload</servlet-name>
<servlet-class>huc.blog.servlet.Upload</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>DoReg</servlet-name>
<url-pattern>/servlet/DoReg</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>DoLogin</servlet-name>
<url-pattern>/servlet/DoLogin</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>ShowIndex</servlet-name>
<url-pattern>/servlet/ShowIndex</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>ShowSpace</servlet-name>
<url-pattern>/servlet/ShowSpace</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>ShowBlog</servlet-name>
<url-pattern>/servlet/ShowBlog</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>BlogList</servlet-name>
<url-pattern>/servlet/BlogList</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>ShowProfile</servlet-name>
<url-pattern>/servlet/ShowProfile</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>ManageBlog</servlet-name>
<url-pattern>/servlet/ManageBlog</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>ShowRemark</servlet-name>
<url-pattern>/servlet/ShowRemark</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>UserList</servlet-name>
<url-pattern>/servlet/UserList</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>RemarkList</servlet-name>
<url-pattern>/servlet/RemarkList</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>ManageRemark</servlet-name>
<url-pattern>/servlet/ManageRemark</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>ManageCategory</servlet-name>
<url-pattern>/servlet/ManageCategory</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>DoLogout</servlet-name>
<url-pattern>/servlet/DoLogout</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>Upload</servlet-name>
<url-pattern>/servlet/Upload</url-pattern>
</servlet-mapping>
<welcome-file-list>
<welcome-file>servlet/ShowIndex</welcome-file>
</welcome-file-list>
<resource-ref>
<description>blog DB connect pool</description>
<res-ref-name>jdbc/blog</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
</resource-ref>
</web-app>