jsp项目传到服务器后 servlet访问不到

Object not found!

The requested URL was not found on this server. The link on the referring page seems to be wrong or outdated. Please inform the author of that page about the error.

If you think this is a server error, please contact the webmaster.

我是把项目打包成war包上传的
提交表单到这个servlet,然后出现这个,求大神告知解决方法

2个回答

补充一下

 <?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_3_0.xsd" id="WebApp_ID" version="3.0">
  <display-name>port</display-name>
  <servlet>
    <servlet-name>UploadServlet</servlet-name>
    <servlet-class>Servlet.UploadServlet</servlet-class>
  </servlet>
  <servlet-mapping>
    <servlet-name>UploadServlet</servlet-name>
    <url-pattern>/upload</url-pattern>
  </servlet-mapping>
  <servlet>
    <servlet-name>UpdateServlet</servlet-name>
    <servlet-class>Servlet.UpdateServlet</servlet-class>
  </servlet>
  <servlet-mapping>
    <servlet-name>UpdateServlet</servlet-name>
    <url-pattern>/update</url-pattern>
  </servlet-mapping>
  <servlet>
    <servlet-name>re_UploadServlet</servlet-name>
    <servlet-class>Servlet.re_UploadServlet</servlet-class>
  </servlet>
  <servlet-mapping>
    <servlet-name>re_UploadServlet</servlet-name>
    <url-pattern>/re_upload</url-pattern>
  </servlet-mapping>

   <servlet>
    <servlet-name>re_UpdateServlet</servlet-name>
    <servlet-class>Servlet.re_UpdateServlet</servlet-class>
  </servlet>
  <servlet-mapping>
    <servlet-name>re_UpdateServlet</servlet-name>
    <url-pattern>/re_update</url-pattern>
  </servlet-mapping>
  <servlet>
    <servlet-name>LoginServlet</servlet-name>
    <servlet-class>Servlet.LoginServlet</servlet-class>
  </servlet>
  <servlet-mapping>
    <servlet-name>LoginServlet</servlet-name>
    <url-pattern>/login</url-pattern>
  </servlet-mapping>
  <welcome-file-list>
    <welcome-file>index.html</welcome-file>
    <welcome-file>index.htm</welcome-file>
    <welcome-file>index.jsp</welcome-file>
    <welcome-file>default.html</welcome-file>
    <welcome-file>default.htm</welcome-file>
    <welcome-file>default.jsp</welcome-file>
  </welcome-file-list>
</web-app>

这是我的web.xml配置,本地上访问servlet都没问题,可是上传到服务器上就访问不到,出现404

我也出现了,请问您怎么解决的呢?

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
立即提问
相关内容推荐