关于jsp中的Unable to compile class for JSP解决
来源:互联网 发布:client mac and addr 编辑:程序博客网 时间:2024/06/06 03:35
我在一个ajax项目中引用了xml,在写到
Document xmlDoc = (Document)new XPPReader().read(new ByteArrayInputStream(xml.getBytes()));
的时候,出现
- Multiple annotations found at this line:
- - The type org.gjt.xpp.XmlPullParserException cannot be resolved. It is indirectly referenced from
- required .class files
- - The method read(InputStream) from the type XPPReader refers to the missing type XmlPullParserException
- - The type org.gjt.xpp.XmlPullParserException cannot be resolved. It is indirectly referenced from
- required .class files
- - The method read(InputStream) from the type XPPReader refers to the missing type XmlPullParserException
<%@page import="org.gjt.xpp.*"%>
然后这错误也就不见了
jsp写完了,开开心心启动程序,一运行,结果又开始出现错误,还是一样的错误,想必刚刚是指标不治本。
查看异常说明,看到这样一句
Unable to compile class for JSP
怎么会不能编译呢,于是又百度,这次是说把工程下的servlet-api.jar和jsp.api.jar删除掉
我找了一下,我的工程只有servlet-api.jar,没有jsp.api.jar,我把servlet-api.jar删掉了,但是一删掉,工程中引用了这个包的类全都报错
显然这个方法行不通,于是我又把这个包添加回来。
上次写到一半,现在忘记具体细节了,只记得是要把servlet-api.jar放到工程的lib下,不能放在工程外面。应该是程序运行的时候,在lib下查找对应的类吧。
0 0
- 关于jsp中的Unable to compile class for JSP解决
- Unable to compile class for JSP 错误的解决过程
- 如何解决Unable to compile class for JSP
- Unable to compile class for JSP 错误的解决过程。
- Unable to compile class for JSP 错误的解决过程。
- Unable to compile class for JSP的解决
- Unable to compile class for JSP解决方案
- Unable to compile class for JSP
- Unable to compile class for JSP
- Unable to compile class for JSP
- Unable to compile class for JSP
- Unable to compile class for JSP
- Unable to compile class for JSP 解决办法
- Unable to compile class for JSP 解决方法
- Unable to compile class for JSP:
- Unable to compile class for JSP
- JavaWeb:Unable to compile class for JSP
- Unable to compile class for JSP
- POJ 1050 最大子矩阵和
- Action Bar of Android
- 用Selenium录制添加到购物车的测试用例
- inifile 一个轻量级的INI文件解析库
- 基于easyui开发Web版Activiti流程定制器详解(三)——页面结构(上)
- 关于jsp中的Unable to compile class for JSP解决
- Android (DiskLruCache)硬盘缓存代码实现
- RegexKitLite实现正则表达式
- Appium上的截图保存
- iFrame
- ReentrantLock可重入锁的使用场景
- Oracle RAC核心技术详解——互动出版网
- C#状态模式——解决方法过长问题
- Fragment使用时的一些Tips