注意你的错误信息:
Unable to compile class for JSP
应该是tomcat没配好的原因吧
Unable to compile class for JSP
应该是tomcat没配好的原因吧
解决方案 »
- jsp 编译流程问题
- 有关struts的问题,比较怪异。
- xfire 与 axis的区别
- 请问高手是怎么学习jsp里的异常处理的???
- spring
- Hibernate中的po类为什么要重写equals和hashCode方法的对话
- WebLogic 和Web Sphere 哪一个更好呢?
- 疑问:log4j问题
- 哪里有SQL Server 2000 Driver for JDBC 的中文帮助文件啊?哪位大虾帮帮忙啊!
- 提个很现实的问题:对于中小型企业,采用j2ee和.net哪种更便宜?具体?
- org.apache.cactus
- 是不是FileSystemXmlApplicationContext只能在main()中使用?
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:358)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:301)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:248)
javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
root cause java.lang.NullPointerException
org.apache.struts.taglib.TagUtils.retrieveMessageResources(TagUtils.java:1175)
org.apache.struts.taglib.TagUtils.message(TagUtils.java:1038)
org.apache.struts.taglib.bean.MessageTag.doStartTag(MessageTag.java:224)
org.apache.jsp.hello.hello_jsp._jspx_meth_bean_message_0(hello_jsp.java:184)
org.apache.jsp.hello.hello_jsp._jspx_meth_html_html_0(hello_jsp.java:125)
org.apache.jsp.hello.hello_jsp._jspService(hello_jsp.java:94)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:133)
javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:311)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:301)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:248)
javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
note The full stack trace of the root cause is available in the Tomcat logs.
--------------------------------------------------------------------------------Apache Tomcat/5.0.19
1\换一个tomcat,我用的是5.5.17。无错误。(tomcat建议用解压缩版,不要用安装版)
2\换一个struts,直接从apache下1.28,无错误,或用随书光盘中代的struts.
3\如果都不行,重装jdk,我有个同学也报错,重装jdk后没事了。
org.apache.struts.taglib.TagUtils.retrieveMessageResources(TagUtils.java:1175)NullPointerException你核对一下工程文件结构是否有问题?
因为孙卫琴的原书光盘我弄丢了,所以我都是环境自己的,代码照着书上做的。
到底标准环境怎么配呢?
STRUTS1.28的官方网站下不了,TOMCAT5.5.17没有找到。
唉,折腾几天了,看来真难搞啊。
-----------------------------------------那随书光盘的源码上网搜应该不难找,你要是找不到struts、tomcat和源码我给你发一个,你要是要就留个邮箱,我不用QQ。
我实在受不了折腾了,干脆用eclipse开发工具,参考了网上一篇很不错的文章,
http://www.cnblogs.com/EndPoint/archive/2007/03/06/666067.html
学会了以后,再把孙卫琴的例子联系了一遍,搞定了。看来我的代码没有写错,都是环境配置惹得祸。
为了感谢大家的支持,把我测试通过的孙卫琴的例子打包放到网上,供大家下载,大家就不用去找光盘了,我都写好了。
顺便说一句,我的环境是:apache-tomcat-5.5.23+eclipse-SDK-3.2.2-win32。
代码下载网址:www.lhsoft.com.cn/service/hello.rar
下载后直接放在tomcat的root目录下,就可以运行了。