| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 3468 人关注过本帖
标题:大家帮我看下这错误该怎么改?
只看楼主 加入收藏
青格儿
Rank: 4
等 级:贵宾
威 望:11
帖 子:698
专家分:20
注 册:2007-7-31
结帖率:87.5%
收藏
 问题点数:0 回复次数:6 
大家帮我看下这错误该怎么改?
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都加进去了,和别人用的相同的代码,为什么他的可以运行,而我的却出现这个错误?
搜索更多相关主题的帖子: class occurred server cannot 
2007-12-08 16:11
sea7
Rank: 2
等 级:新手上路
威 望:3
帖 子:291
专家分:0
注 册:2007-2-17
收藏
得分:0 
jsp页面有错误,仔细检查一下

软件是一种修养
2007-12-08 20:14
guoxhvip
Rank: 8Rank: 8
来 自:聖西羅南看臺
等 级:贵宾
威 望:44
帖 子:4052
专家分:135
注 册:2006-10-8
收藏
得分:0 
先自己检查一下吧

愛生活 && 愛編程
2007-12-08 22:11
青格儿
Rank: 4
等 级:贵宾
威 望:11
帖 子:698
专家分:20
注 册:2007-7-31
收藏
得分:0 
我都检查好几遍了,谢谢各位的回答!
呵呵,我用jspsmart 做出来了。可是上面的报错信息我真是看不懂,那出问题了?那代码是老师给的!不会错吧?我什么都没动啊!怎么会报上面的错啊?不是我一个人的是这样,有的人的可以,有的就不行,好奇怪
2007-12-09 11:12
青格儿
Rank: 4
等 级:贵宾
威 望:11
帖 子:698
专家分:20
注 册:2007-7-31
收藏
得分:0 
哦,对了,要限定时间上传怎么做?也就是到了一定时间,不让上传.。这代码我该怎么写?
2007-12-09 11:31
jamesdotzhou
Rank: 1
等 级:新手上路
帖 子:1
专家分:0
注 册:2007-12-12
收藏
得分:0 
试试下面 upload.jar 看看
[url]http://download.[/url]
2007-12-12 21:05
青格儿
Rank: 4
等 级:贵宾
威 望:11
帖 子:698
专家分:20
注 册:2007-7-31
收藏
得分:0 
谢谢,jsp页面没问题,现在已经可以上传了!
我又建了一个新工程,导进去,直接就可以用了。估计是我开始时工程建得有问题吧!
顺便再问下:如果MyEclipse装得时候,没把它装在eclipse中的plugins文件夹中,那么日后会有什么影响?
2007-12-15 09:11
快速回复:大家帮我看下这错误该怎么改?
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.019741 second(s), 9 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved