You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Viswanatha Rao <vr...@pdq.net> on 2003/08/18 16:58:00 UTC

accessing jsp on tomcat

I have installed Tomcat 4.1. I configured the server.xml and added a
Context as follows:
 
<Context path="/mycode" docBase="c:\\webdev" defaultSessionTimeout="30" 
                        isWARExpanded="true" isWARValidated="false"
isInvokerEnabled="true" 
                        isWorkDirPersistent="false" debug="0"
                        reloadable="true" >
</Context>
 
I restarted Tomcat. I copied snoop.jsp from the examples dir in my
application directory c:\webdev
When I access it with http://localhost:8080/mycode/snoop.jsp I get
exception:
 
org.apache.jasper.JasperException: Unable to compile class for JSP
An error occurred at line: -1 in the jsp file: null
Generated servlet error:
    [javac] Since fork is true, ignoring compiler setting.
    [javac] Compiling 1 source file
    [javac] Since fork is true, ignoring compiler setting.
    [javac]
C:\jakarta\jakarta-tomcat-4.1.24\work\Standalone\localhost\mycode\snoop_
jsp.java:59: package util does not exist
    [javac]  out.print(util.HTMLFilter.filter(request.getPathInfo())); 
    [javac]                ^
    [javac]
C:\jakarta\jakarta-tomcat-4.1.24\work\Standalone\localhost\mycode\snoop_
jsp.java:62: package util does not exist
    [javac]
out.print(util.HTMLFilter.filter(request.getQueryString())); 
    [javac]                ^
    [javac]
C:\jakarta\jakarta-tomcat-4.1.24\work\Standalone\localhost\mycode\snoop_
jsp.java:92: package util does not exist
    [javac]
out.print(util.HTMLFilter.filter(request.getHeader("User-Agent"))); 
    [javac]                ^
    [javac] 3 errors
 
 
Can anyone help?