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中没有错误记录