Abaixo segue o erro que dá quanto faz o upload…
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: 9 in the generated java file
Only a type can be imported. org.apache.commons.fileupload.DiskFileUpload resolves to a package
An error occurred at line: 10 in the generated java file
Only a type can be imported. org.apache.commons.fileupload.FileItem resolves to a package
An error occurred at line: 11 in the generated java file
Only a type can be imported. org.apache.commons.fileupload.FileUploadException resolves to a package
An error occurred at line: 12 in the generated java file
Only a type can be imported. org.apache.commons.fileupload.FileUpload resolves to a package
An error occurred at line: 24 in the jsp file: /uploadDiretorio.jsp
FileUpload cannot be resolved
21:
22:
23:
24: if (FileUpload.isMultipartContent(request)){
25:
26: DiskFileUpload upload = new DiskFileUpload();
27:
An error occurred at line: 26 in the jsp file: /uploadDiretorio.jsp
DiskFileUpload cannot be resolved to a type
23:
24: if (FileUpload.isMultipartContent(request)){
25:
26: DiskFileUpload upload = new DiskFileUpload();
27:
28: upload.setRepositoryPath(caminhoTemp);
29:
An error occurred at line: 26 in the jsp file: /uploadDiretorio.jsp
DiskFileUpload cannot be resolved to a type
23:
24: if (FileUpload.isMultipartContent(request)){
25:
26: DiskFileUpload upload = new DiskFileUpload();
27:
28: upload.setRepositoryPath(caminhoTemp);
29:
An error occurred at line: 43 in the jsp file: /uploadDiretorio.jsp
FileItem cannot be resolved to a type
40:
41:
42:
43: FileItem item = (FileItem) iter.next();
44:
45: if (!item.isFormField()) {
46:
An error occurred at line: 43 in the jsp file: /uploadDiretorio.jsp
FileItem cannot be resolved to a type
40:
41:
42:
43: FileItem item = (FileItem) iter.next();
44:
45: if (!item.isFormField()) {
46:
An error occurred at line: 66 in the jsp file: /uploadDiretorio.jsp
FileUploadException cannot be resolved to a type
63:
64:
65:
66: }catch(FileUploadException e){
67:
68: out.write(“Não foi possível efetivar o upload do arquivo - segue a causa do erro” + “
” + e.getMessage());
69:
An error occurred at line: 12 in the jsp file: /uploadDiretorio.jsp
e cannot be resolved
9:
10:
11:
12: <%
13:
14:
15:
An error occurred at line: 70 in the jsp file: /uploadDiretorio.jsp
e cannot be resolved
67:
68: out.write(“Não foi possível efetivar o upload do arquivo - segue a causa do erro” + “
” + e.getMessage());
69:
70: e.printStackTrace();
71: }
72:
73: }
Stacktrace:
org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:92)
org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:330)
org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:423)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:308)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:286)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:273)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:566)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:317)
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.14 logs.