Sumit-

Thanks for taking the time to reply.  I have not tried that route but I will
play around with it to see how this works.  Yet this still means that I have
to have access to the C drive on the server.  Well, yes I can set the class
path and then just use that path for all code updates.  But I am really
looking for a way to not have to do that.  I want to deploy with all the
defaults, but help tomcat and the jspcompiler know where my classes are.
There must be way to do this and I am sure not everyone is putting their
applications under <Tomcat Home>\webapps or all their jsp's under the
context root.  The full description of the context is below.  I have read a
lot of other classpath issues and jsp compile issues, but they were very
different from this situation (described below).

The configuration should allow me to enter the context in server.xml and be
able to update my code under my application context (on the other drive)
without having to touch anything in the Tomcat installation.  Any ideas!!

Thanks.

-----Original Message-----
From: Shrotriya, Sumit [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, January 29, 2003 1:49 PM
To: 'Tomcat Users List'
Subject: RE: Web App Classloader..How?


Hi Haytham,
  I am pretty new to Tomcat myself but I think this will help you.
Modify your setclasspath.bat file in your %TOMCAT%\bin dir to have
your files added to the CLASSPATH env variable. In this case as long as the
sun.misc.Launcher$AppClassLoader class loader is called to load the files
(which I am pretty sure it will be called) your classes can be loaded from
whichever location you like.

 I hope that helps.
~Sumit


-----Original Message-----
From: Haytham Samad [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, January 29, 2003 1:53 PM
To: Tomcat Users List
Subject: Web App Classloader..How?


I have a question regarding how the web application loader works.
Especially when my application is not deployed under <tomcat home>/webapps
in Tomcat 4.1.x.

This is the situation.  Tomcat is installed on drive "C:" on the server and
I have my application deployed on drive D.  This is the a requirement.  In
my application, I have 2 jsp's that are under WEB-INF\jsp.  They can only be
accessed through forwards from other resources on the server.  In these
jsp's, I make use of classes that are under WEB-INF\classes in my
application.  Now, when the jsp compiler attempts to compile the jsp's
(create servlet classes and then compile them) how does it know where to
look for the classes.  I would like to know how that works and how I can
control it (change the class loading behavior) to help with the following
issue:

When I hit one of the jsp's, I get a compilation error saying that the
calsses I imported and attempted to use in my jsp cannot be found?  It also
shows that it is looking under a directory that is under the C drive and not
under my application's WEB-INF\classes directory.

I have the server.xml configuration as follows:

        <Context path="/MyApp" docBase="D:\Webfiles\TomcatApps\MyApp"
debug="0">
                <Logger className="org.apache.catalina.logger.FileLogger"
directory="D:\Webfiles\LogFiles"
                        prefix="MyApp" timestamp="true" />
        </Context>

I am using STRUTS, but that should not be a big deal since I have the jsp's
mapped correctly.  This all works fine when I deploy under <Tomcat
Home>\webapps.  It is just when I deploy as described above (production
deployment) does this happen.  I would appreciate any direction on this and
if possible some good description (or a pointer to where I can find one) as
to how to control the class loader.

Another option I tried was compiling the jsp's and loading them up compiled
in org/apache/jsp.  This worked but with frequent updates to the site and
more jsp's, this will become a hassle.  Thanks for the help.

Haytham


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to