tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From William Brogden <wbrog...@bga.com>
Subject Re: Class file locations for use with JSPs
Date Thu, 09 Nov 2000 05:27:52 GMT


"Desaulniers, Peter" wrote:
> 
> Hello there,
> 
> I am using tomcat 3.0 to serve up an application that starts with a servlet
> and then get forwarded to a jsp page for the response.  The relevent
> directory structure looks like this (no surprises here, I think):
> 
> C:\jakarta-tomcat
>     +
>     +-- webapps
>         +
>         +-- myApp
>             +
>             +-- jsp
>             +
>             +-- Web-inf
>                 +
>                 +-- classes
> 
> The jsp file, myJSP.jsp, is in the jsp directory.
> The servlet, myServlet.class is in the classes directory.
> The Worker class (this is the problem I will be getting to), Worker.class,
> is also in the classes directory.
> 
> To fire this off, I use some mappings but essentially this is how it goes:
> 
> http://myHost/stuff/moreStuff/Command/Data
> 
> The mappings get resolved to calling myServlet.  myServlet, imports,
> instantiates and calls methods in Worker.  That works great!  Then if
> forwards the request to the jsp.  Again that works great.
> 
> Now for the problem.  I have <%@ page import="Worker.*" %> and its happy
> with that.  However, when I try to do <% Worker w = new Worker(); %> the jsp
> compilation fails with:
> 
> org.apache.jasper.JasperException: Unable to compile class for
> JSPF:\jakarta-tomcat\work\localhost_8080%2Fdscgi\_0002fdscommands_0002fmyJSP
> _0002ejspmyJSP_jsp_1.java:77: Class jsp.Worker not found.
>                   Worker w = new Worker();

Jasper is making an assumption that Worker is in the default
directory.
You should give a complete package and path in the  variable
declaration
and creation statement.

Is the package really named Worker?
WBB

Mime
View raw message