学习Struts(1)-郁闷的第一步,环境问题
2004-10-27 12:42
369 查看
今天有点心血来潮,突然想自己整个struts的应用学习一下,于是拿来前阵子买的《精通struts:基于MVC的Java Web设计与开发》,看到第二章,有个非常简单的例子,因此觉得拿来上手。
启动tomcat5.0.19,在地址栏输入http://localhost:8080/helloapp/,
......居然显示了一页编译错误,很是郁闷。
错误信息如下:
开始查找原因,设置了环境变量后,重新启动了tomcat,结果错误依旧,痛苦万分~
上google,果然好用,一下就找到了解决方法:
启动tomcat5.0.19,在地址栏输入http://localhost:8080/helloapp/,
......居然显示了一页编译错误,很是郁闷。
错误信息如下:
org.apache.jasper.JasperException:Unable to compile class for JSP No Java compiler was found to compile the generated source for the JSP. This can usually be solved by copying manually $JAVA_HOME/lib/tools.jar from the JDK to the common/lib directory of the Tomcat server, followed by a Tomcat restart. If using an alternate Java compiler, please check its installation and access path... |
上google,果然好用,一下就找到了解决方法:
1. Make sure the following environment variables are set correctly: >>> JAVA_HOME points to "C:/j2sdk1.4.2" (correct folder if changed) >>> CLASSPATH points to %JAVA_HOME%/lib >>> PATH points to %JAVA_HOME%/bin 2. copy $JAVA_HOME/lib/tools.jar to the common/lib directory of the Tomcat server 3. Update your registry to reflect the new JVM location: key: HKEY_LOCAL_MACHINE/SYSTEM/ControlSet001/Services/Apache Tomcat/Parameters/JVM Library value: C:/j2sdk1.4.2/jre/bin/server/jvm.dll |
相关文章推荐
- 郁闷2009、7、5日,找工作一天累的半死,晚上回来继续学习struts
- Struts学习总结(一)---搭建Struts框架
- Struts2学习第二天:通配符精简struts.xml,访问web元素
- Struts 1 Validator框架学习笔记
- struts学习笔记---Validator的使用(一)
- SSH框架学习(四、在struts和spring基础上加入hibernate)
- Struts2.x学习六(struts.properties配置详解 )
- Mac学习第一步——Mac OS X系统常用多点触摸板操作手势
- 框架学习之Struts2 第一节 开发环境的搭建和第一个应用开发
- Struts2框架学习系列(二) Action --struts.xml配置文件详解
- Struts1 - 源码学习 - ActionServlet
- Java新手如何学习Spring、Struts、Hibernate三大框架?(转)
- Java教程 实战学习Struts实例
- Struts 2学习及问题记录(3)——类型转换及输入校验
- Struts 2.0 学习笔记(2)
- Struts学习之day01
- 深入浅出学习Struts1框架(一):一个简单mvc模式代码示例开始
- 我的struts的学习过程
- Struts学习傻瓜式入门篇
- 学习笔记---使用prototype.js扩展struts标签实现xmlhttprequest