大家帮我看下这错误该怎么改?
HTTP Status 500 - --------------------------------------------------------------------------------
type Exception report
message
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
org.apache.jasper.JasperException: Unable to compile class for JSP:
An error occurred at line: 37 in the jsp file: /upload.jsp
ServletFileUpload cannot be resolved
34: %>
35: <%
36: // Check that we have a file upload request
37: boolean isMultipart = ServletFileUpload.isMultipartContent(request);
38: if (isMultipart) {
39: // Create a factory for disk-based file items
40: org. factory = new DiskFileItemFactory();
An error occurred at line: 40 in the jsp file: /upload.jsp
org. cannot be resolved to a type
37: boolean isMultipart = ServletFileUpload.isMultipartContent(request);
38: if (isMultipart) {
39: // Create a factory for disk-based file items
40: org. factory = new DiskFileItemFactory();
41: // Create a new file upload handler
42: ServletFileUpload upload = new ServletFileUpload(factory);
43: // Parse the request
An error occurred at line: 40 in the jsp file: /upload.jsp
DiskFileItemFactory cannot be resolved to a type
37: boolean isMultipart = ServletFileUpload.isMultipartContent(request);
38: if (isMultipart) {
39: // Create a factory for disk-based file items
40: org. factory = new DiskFileItemFactory();
41: // Create a new file upload handler
42: ServletFileUpload upload = new ServletFileUpload(factory);
43: // Parse the request
An error occurred at line: 42 in the jsp file: /upload.jsp
ServletFileUpload cannot be resolved to a type
39: // Create a factory for disk-based file items
40: org. factory = new DiskFileItemFactory();
41: // Create a new file upload handler
42: ServletFileUpload upload = new ServletFileUpload(factory);
43: // Parse the request
44: List /* FileItem */items = upload.parseRequest(request);
45: // Process the uploaded items
An error occurred at line: 42 in the jsp file: /upload.jsp
ServletFileUpload cannot be resolved to a type
39: // Create a factory for disk-based file items
40: org. factory = new DiskFileItemFactory();
41: // Create a new file upload handler
42: ServletFileUpload upload = new ServletFileUpload(factory);
43: // Parse the request
44: List /* FileItem */items = upload.parseRequest(request);
45: // Process the uploaded items
An error occurred at line: 48 in the jsp file: /upload.jsp
org. cannot be resolved to a type
45: // Process the uploaded items
46: Iterator iter = items.iterator();
47: while (iter.hasNext()) {
48: org. item = (org.) iter
49: .next();
50: if (item.isFormField()) {
51: String name = item.getFieldName();
An error occurred at line: 48 in the jsp file: /upload.jsp
org. cannot be resolved to a type
45: // Process the uploaded items
46: Iterator iter = items.iterator();
47: while (iter.hasNext()) {
48: org. item = (org.) iter
49: .next();
50: if (item.isFormField()) {
51: String name = item.getFieldName();
Stacktrace:
org.apache.(DefaultErrorHandler.java:85)
org.apache.(ErrorDispatcher.java:330)
org.apache.(JDTCompiler.java:415)
org.apache.(Compiler.java:308)
org.apache.(Compiler.java:286)
org.apache.(Compiler.java:273)
org.apache.jasper.(JspCompilationContext.java:566)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:308)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
note The full stack trace of the root cause is available in the Apache Tomcat/6.0.10 logs.
这是怎么了,我在MyEclipse里做文件上传,commons-fileupload-1.2.jar commons-io-1.3.2.jar都加进去了,和别人用的相同的代码,为什么他的可以运行,而我的却出现这个错误?