tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jason Friedman" <ysongl...@gmail.com>
Subject Tomcat and JSP Issue
Date Fri, 02 Feb 2007 19:46:33 GMT
My tomcat works perfectly normal before today. I did nothing to it,
but now even the simplest JSP code gives errors:

whatswrong.jsp
=======================================================
<%@ page    language="java" contentType="text/html"
        import=" java.util.*,java.io.*,java.sql.*"%>
<%
        try{
                String myname = "Jason";
        }catch(Exception e){
                e.printStackTrace();
        }
%>
<html>
<body>
This is a html, my name is <%=myname%></body>
</html>
=======================================================

Here are the errors:
=======================================================
HTTP Status 500 -type Exception reportmessage

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

An error occurred at line: 20 in the jsp file: /whatswrong.jsp

Generated servlet error:
    [javac] Compiling 1 source file

/home/yasong/apache-tomcat-4.1.34/work/Standalone/localhost/_/whatswrong_jsp.java:57:
cannot resolve symbol
symbol  : variable myname
location: class org.apache.jsp.whatswrong_jsp
      out.print(myname);
                ^
1 error
	at org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:85)
	at org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:248)
	at org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:343)
	at org.apache.jasper.compiler.Compiler.compile(Compiler.java:356)
	at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:427)
	at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:142)
	at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:240)
	at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:187)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:809)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:198)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:144)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:209)
	at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:595)
	at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:432)
	at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:954)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:138)
	at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:595)
	at org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:197)
	at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:593)
	at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:432)
	at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:954)
	at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2459)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:132)
	at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:595)
	at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:118)
	at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:593)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:116)
	at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:593)
	at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:432)
	at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:954)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:126)
	at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:595)
	at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:544)
	at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:593)
	at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:432)
	at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:954)
	at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:152)
	at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
	at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
	at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
	at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
	at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
	at java.lang.Thread.run(Thread.java:534)

Apache Tomcat/4.1.34
=======================================================

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message