我得到了web.xml:
<?xml version="1.0" encoding="utf-8" standalone="no"?><web-app xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.5" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
<servlet>
<servlet-name>SellVideo</servlet-name>
<jsp-file>WEB-INF/jsp/sell-video.jsp</jsp-file>
</servlet>
<servlet-mapping>
<servlet-name>SellVideo</servlet-name>
<url-pattern>/sell-video</url-pattern>
</servlet-mapping>
<servlet>
<servlet-name>Edit</servlet-name>
<servlet-class>vidaao.EditServlet</servlet-class>
</servlet>
<servlet>
<servlet-name>Request</servlet-name>
<servlet-class>vidaao.RequestServlet</servlet-class>
</servlet>
<servlet>
<servlet-name>Upload</servlet-name>
<servlet-class>vidaao.UploadServlet</servlet-class>
</servlet>
<servlet>
<servlet-name>Serve</servlet-name>
<servlet-class>vidaao.ServeServlet</servlet-class>
</servlet>
<servlet>
<servlet-name>Guestbook</servlet-name>
<servlet-class>vidaao.GuestbookServlet</servlet-class>
</servlet>
<servlet>
<servlet-name>Profile</servlet-name>
<servlet-class>vidaao.ProfileServlet</servlet-class>
</servlet>
<servlet>
<servlet-name>Register</servlet-name>
<servlet-class>vidaao.RegisterServlet</servlet-class>
</servlet>
<servlet>
<servlet-name>Vidaao</servlet-name>
<servlet-class>vidaao.VidaaoServlet</servlet-class>
</servlet>
<servlet>
<servlet-name>Connect</servlet-name>
<servlet-class>vidaao.ConnectServlet</servlet-class>
</servlet>
<servlet>
<servlet-name>Ajax</servlet-name>
<servlet-class>vidaao.AjaxServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>Ajax</servlet-name>
<url-pattern>/ajax</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>Connect</servlet-name>
<url-pattern>/connect</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>Edit</servlet-name>
<url-pattern>/edit</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>Register</servlet-name>
<url-pattern>/register</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>Request</servlet-name>
<url-pattern>/request</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>Upload</servlet-name>
<url-pattern>/upload</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>Serve</servlet-name>
<url-pattern>/serve</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>Guestbook</servlet-name>
<url-pattern>/guestbook</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>Profile</servlet-name>
<url-pattern>/</url-pattern>
</servlet-mapping>
<welcome-file-list>
<welcome-file>WEB-INF/jsp/home.jsp</welcome-file>
</welcome-file-list>
<servlet>
<servlet-name>SystemServiceServlet</servlet-name>
<servlet-class>com.google.api.server.spi.SystemServiceServlet</servlet-class>
<init-param>
<param-name>services</param-name>
<param-value/>
</init-param>
</servlet>
<servlet-mapping>
<servlet-name>SystemServiceServlet</servlet-name>
<url-pattern>/_ah/spi/*</url-pattern>
</servlet-mapping>
</web-app>
如果网址映射之前没有匹配,那么sevlet Profile应该像这个wwww.xxx.com/*一样数学所有网址。
该配置文件是正常工作,但是当我尝试部署时,所有内容都直接进入配置文件servlet。例如,sell-video甚至sell-video.jsp将重定向到配置文件servlet。
答案 0 :(得分:1)
我修好了,
我必须在WEB-INF前面添加一个斜杠,
像这样:<jsp-file>/WEB-INF/jsp/sell-video.jsp</jsp-file>
仍然很奇怪,这个问题只是在线附加而不是在开发方面,这使得调试变得更加困难。