tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andy Wadsworth <an...@bondmart.com>
Subject Re: Classpath problems with tomcat on Linux 9
Date Tue, 20 Apr 2004 19:06:11 GMT

Figured out my problem. I wasn't placing the class file in a subdirectory
of the WEB-INF/classes/<package>.

Solution:
   created UserData.java with package name "userdata"
   created directory WEB-INF/classes/userdata
   placed UserData.class in WEB-INF/classes/userdata

Thank you all who responded, and anyone else that read this and spent
more then the time to click the delete button on it.

-Andy.

On Monday 19 April 2004 12:27 pm, Stephen Bacon wrote:
> Hi Andy,
>
>    I'm porting over to TC5 and I've not had any problems with it finding
> my classes, *BUT* I don't put any classes into the base directory
> itself, but below that.
>
> So for example, my UserBean class is in
> <myapp>/WEB-INF/classes/AccessCtrl and it is part of the package
> "AccessCtrl" (i.e. first line of bean is "package AccessCtrl;")
>
> The pages that use this include the directive:
> <%@ page import="AccessCtrl.*" %>
> so that it can find them.
>
> Additionally, to avoid problems, I generally include the packagename
> anyways in my useBean tags:
> <jsp:useBean id="beanUser"
>               class="AccessCtrl.UserBean"
>               scope="session" />
> Which shouldn't be necessary, but I find it increases readability anyways.
>
> -Steve
>
> Andy Wadsworth wrote:
> > Should I expect Tomcat to find my UserData.class file if I put it
> > in webapps/<myapp>/WEB-INF/classes? Do I need to create a web.xml
> > or should it find the class file without any web.xml customization?
> > If anyone has a very simple example that I could drop in to see if
> > it works, I'd appreciate it. I've already verified that the jsp-examples
> > all work, but there is a lot of stuff in the web.xml that I shouldn't
> > need for what I want to do, and finding what I need is probably where
> > my problems lie.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org

-- 
###############################
# Andy Wadsworth              #
#                             #
# BondMart Technologies, Inc. #
# andyw@bondmart.com          #
#                             #
###############################
    Historical High School Essay Bloopers:
    They (Greeks) also had myths.  A myth is a
    female moth.  One myth says that the mother
    of Achilles dipped him in the River Stynx
    until he became intollerable.


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Mime
View raw message