Servlet在本地工作,但在专用服务器空白页上

问题描述 投票:0回答:0


web.xml中:

<?xml version="1.0" encoding="UTF-8"?>
<web-app>
  <display-name>Ajax uploader</display-name>
  <welcome-file-list>
    <welcome-file>index.jsp</welcome-file>
  </welcome-file-list>
  <servlet>
    <display-name>UploadFile</display-name>
    <servlet-name>UploadFile</servlet-name>
    <servlet-class>com.fileupload.UploadFile</servlet-class>
  </servlet>
  <servlet-mapping>
    <servlet-name>UploadFile</servlet-name>
    <url-pattern>/UploadFile</url-pattern>
  </servlet-mapping>
</web-app>

JSP:

<form id="UploadForm" action="UploadFile" method="post" enctype="multipart/form-data">

可以在localhost上完美运行,但可以在专用的tomcat上运行:

空白页

位置似乎合法:

/uploader/WEB-INF/classes/com/fileupload/UploadFile.class

没有错误登录catalina.out

java jsp servlets
© www.soinside.com 2019 - 2024. All rights reserved.