日期:2014-05-18  浏览次数:20747 次

jsp 只报一种错,这是为何?
我用的是   tomcat5.0  
我的jsp   页面如果没有任何语法错误,就会正常的执行
但是,如果有语法错误,他就只会出现一种错误提示:
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.
事实上,我已经按照出错的提示把jdk的   tools.jar   给拷到   tomcat   的comm/lib   下面去了,但是,只要一有语法错误,还是报上面的错误,如果我知道是哪出了错,改正之后又是正常运行,如果不知道哪出的错误,就只能自己瞎猜了。



------解决方案--------------------
我的异常网推荐解决方案:java环境变量设置,http://www.aiyiweb.com/java-other/172921.html
------解决方案--------------------
你真强 换个
------解决方案--------------------
服...
------解决方案--------------------
强人,拷贝tools.jar不如设置JAVA_HOME环境变量
------解决方案--------------------
环境变量没设置好
------解决方案--------------------
No Java compiler was found ===> 找不到Java编译器
------解决方案--------------------
设置好Path Classpath 把tools.jar加到classpath里
------解决方案--------------------
在环境变量中增加一个 CLASSPATH 变量,把它的值设为 .;%JAVA_HOME%\lib\tools.jar
我的异常网推荐解决方案:org.apache.jasper.JasperException: Unable to compile class,http://www.aiyiweb.com/j2ee/2308.html