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

急:一个很简单的问题,我的tomcat 无法运行.jsp文件
我的jdk安装都很正常,系统变量:

JAVA_HOME=c:\j2sdk1.5.0
path=%JAVA_HOME%\bin
classpath=.;%JAVA_HOME%\lib\dt.jar;%JAVA_HOME%\lib\tools.jar;%   CATALINA_HOME%\common\lib\servlet.jar;

CATALINA_HOME=c:\tomcat5.0
CATALINA_BASE=c:\tomcat5.0
都是看网上这么设置的,但是还是有错误:

type   Exception   report

message  

description   The   server   encountered   an   internal   error   ()   that   prevented   it   from   fulfilling   this   request.

exception  

org.apache.jasper.JasperException:   /jj.jsp(1,5)   Invalid   directive
org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:39)
org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:409)
org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:90)
org.apache.jasper.compiler.Parser.parseDirective(Parser.java:506)
org.apache.jasper.compiler.Parser.parseElements(Parser.java:1539)
org.apache.jasper.compiler.Parser.parse(Parser.java:126)
org.apache.jasper.compiler.ParserController.doParse(ParserController.java:220)
org.apache.jasper.compiler.ParserController.parse(ParserController.java:101)
org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:203)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:470)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:451)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:439)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:511)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:295)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)


note   The   full   stack   trace   of   the   root   cause   is   available   in   the   Apache   Tomcat/5.0.28   logs.

难道是tomcat   装的不对?



------解决方案--------------------
不是写得很清楚吗?JSP文件/jj.jsp(1,5)有问题啊~~
------解决方案--------------------
<html>
<body bgcolor= "#FFFFFF ">
<%
out.println( "Hello,world! ");
out.println( "Frist JSP Program ");
%>
</body>
</html>
这样的

我的异常网推荐解决方案:The server encountered an internal error () that prevented it from fulfilling this request.,http://www.aiyiweb.com/java-web/317.html