You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Chris Williams <ch...@cisco.com> on 2001/04/17 14:51:13 UTC
Newbie question with classpath and WEB-INF/lib and WEB-INF/classes
I have Tomcat 3.2.1 running on Solaris and I have created a .war file
containing my JSP's I want to execute. My JSP's import some classes I have
create to help out with processing. When I call my JSP, I get errors saying
my class isn't found for import. I have tried including the jar'd version
in both the lib and classes directory along with the uncompressed version in
both of those directories with no luck. What am I missing??? Do I need to
add something to the web.xml file? If I add the jar to another directory
that is already in the classpath it works fine. Please help me...
Thanks
Chris
Re: Newbie question with classpath and WEB-INF/lib and WEB-INF/classes
Posted by Chris Williams <ch...@cisco.com>.
I tried that it and it didn't work. Here is the layout of my war file.
chriwill.war
demo <directory>
jsp <directory> Contains jsp files to use
WEB-INF <directory>
classes <directory> put classes and jar file in here
lib <directory> put classes and jar file in here
web.xml
I reference the page by http://localhost:8080/chriwill/demo/jsp/file.jsp.
Will this setup work and if not, what is the correct layout so my JSP will
load my external classes.
Thanks
Chris
----- Original Message -----
From: "Sam Newman" <sa...@stamplets.com>
To: <to...@jakarta.apache.org>
Sent: Tuesday, April 17, 2001 8:53 AM
Subject: Re: Newbie question with classpath and WEB-INF/lib and
WEB-INF/classes
> You should just put the jar file in the lib directory....
> try doing it unpacked, so you have:
>
> WEB-INF/classes - your servlets/jsp's
> WEB-INF/lib - your jar
>
> I'm not too hot on jsp's,but this works with servlets
>
> sam
> ----- Original Message -----
> From: "Chris Williams" <ch...@cisco.com>
> To: <to...@jakarta.apache.org>
> Sent: Tuesday, April 17, 2001 1:51 PM
> Subject: Newbie question with classpath and WEB-INF/lib and
WEB-INF/classes
>
>
> > I have Tomcat 3.2.1 running on Solaris and I have created a .war file
> > containing my JSP's I want to execute. My JSP's import some classes I
> have
> > create to help out with processing. When I call my JSP, I get errors
> saying
> > my class isn't found for import. I have tried including the jar'd
version
> > in both the lib and classes directory along with the uncompressed
version
> in
> > both of those directories with no luck. What am I missing??? Do I need
> to
> > add something to the web.xml file? If I add the jar to another
directory
> > that is already in the classpath it works fine. Please help me...
> > Thanks
> > Chris
> >
>
Re: Newbie question with classpath and WEB-INF/lib and WEB-INF/classes
Posted by Sam Newman <sa...@stamplets.com>.
You should just put the jar file in the lib directory....
try doing it unpacked, so you have:
WEB-INF/classes - your servlets/jsp's
WEB-INF/lib - your jar
I'm not too hot on jsp's,but this works with servlets
sam
----- Original Message -----
From: "Chris Williams" <ch...@cisco.com>
To: <to...@jakarta.apache.org>
Sent: Tuesday, April 17, 2001 1:51 PM
Subject: Newbie question with classpath and WEB-INF/lib and WEB-INF/classes
> I have Tomcat 3.2.1 running on Solaris and I have created a .war file
> containing my JSP's I want to execute. My JSP's import some classes I
have
> create to help out with processing. When I call my JSP, I get errors
saying
> my class isn't found for import. I have tried including the jar'd version
> in both the lib and classes directory along with the uncompressed version
in
> both of those directories with no luck. What am I missing??? Do I need
to
> add something to the web.xml file? If I add the jar to another directory
> that is already in the classpath it works fine. Please help me...
> Thanks
> Chris
>