使用JWSDP时,配置新的虚拟站点问题
KOON 2004-01-04 04:01:43 小弟初学JSP,使用的是SUN提供的JWSDP,安装后一切正常,使用http://localhost:8080访问看到预定的主页面,配置文件也很正常,运行示范文件都没有问题,这时候我想添加一个新的虚拟站点,如“ABC”,我就在server.xml的文件中添加了一行如下:<Context path="/ABC" docBase="G:\Sun\jwsdp-1.3\webapps\ABC" debug="0" reloadable="true" />,这样访问http://localhost:8080/ABC可以看到该文件下的文件列表,但是我创建了一个TEST.JSP文件,这个文件里面就一句话<% out.println("<h1>JSP配置页面测试<br>成功!</h1>") %>,我想用http://localhost:8080/ABC/test.jsp来访问这个页面,却不能成功,提示如下:
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
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.
org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:128)
org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:348)
org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:415)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:455)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:439)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:555)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:300)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:293)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:240)
javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
note The full stack trace of the root cause is available in the Tomcat logs.
--------------------------------------------------------------------------------
Java Web Services Developer Pack/1.3
我已经查看了本版的精华贴,几位高人提示的环境变量配置我都通过了,提供的范例我也能正常运行,就是自己添加一个新的虚拟站点无法运行,哪位高手能指点一二