web.xml檔案配置中出現的各種問題
阿新 • • 發佈:2019-01-06
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="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">
<display-name>helloapp</display-name>
<welcome-file-list>
<welcome-file>login.html</welcome-file>
</welcome-file-list>
<servlet>
<description></description>
<display-name>DispatchServlet</display-name>
<servlet-name>DispatchServlet</servlet-name>
<servlet-class>mypack.DispatchServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>DispatchServlet</servlet-name>
<url-pattern>/DispatchServlet</url-pattern>
</servlet-mapping>
<servlet>
<description></description>
<display-name>ResInfoServlet</display-name>
<servlet-name>ResInfoServlet</servlet-name>
<servlet-class>mypack.ResInfoServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>ResInfoServlet</servlet-name>
<url-pattern>/ResInfoServlet</url-pattern>
</servlet-mapping>
<servlet>
<servlet-name>HelloWorld</servlet-name>
<servlet-class>mypack.HelloWorld</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>HelloWorld</servlet-name>
<url-pattern>/HelloWorld</url-pattern>
</servlet-mapping>
</web-app>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="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">
<display-name>helloapp</display-name>
<welcome-file-list>
<welcome-file>login.html</welcome-file>
</welcome-file-list>
<servlet>
<description></description>
<display-name>DispatchServlet</display-name>
<servlet-name>DispatchServlet</servlet-name>
<servlet-class>mypack.DispatchServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>DispatchServlet</servlet-name>
<url-pattern>/DispatchServlet</url-pattern>
</servlet-mapping>
<servlet>
<description></description>
<display-name>ResInfoServlet</display-name>
<servlet-name>ResInfoServlet</servlet-name>
<servlet-class>mypack.ResInfoServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>ResInfoServlet</servlet-name>
<url-pattern>/ResInfoServlet</url-pattern>
</servlet-mapping>
<servlet>
<servlet-name>HelloWorld</servlet-name>
<servlet-class>mypack.HelloWorld</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>HelloWorld</servlet-name>
<url-pattern>/HelloWorld</url-pattern>
</servlet-mapping>
</web-app>