I think this will work for non-windows, but YMMV...

To start our Tomcat's on W2K, we modify setclasspath.bat to
include %CLASSPATH% when it constructs it's classpath.

Then tomcat is started via catalina.bat with a start parameter.

It looks like there are .sh versions of all of these files.

--- Dmitry Sklyut <[EMAIL PROTECTED]> wrote:
> You can add setenv.bat/sh to you tomcat bin direcotry. 
> catalina.bat/sh will
> do the following:
> 
> rem Get standard environment variables
> if exist "%CATALINA_HOME%\bin\setenv.bat" call
> "%CATALINA_HOME%\bin\setenv.bat"
> 
> # Get standard environment variables
> PRGDIR=`dirname "$PRG"`
> CATALINA_HOME=`cd "$PRGDIR/.." ; pwd`
> if [ -r "$CATALINA_HOME"/bin/setenv.sh ]; then
>   . "$CATALINA_HOME"/bin/setenv.sh
> fi
> 
> So this is one way of setting up the classpath.
> 
> Dmitry
> 
> -----Original Message-----
> From: Thomas Davis [mailto:[EMAIL PROTECTED]
> Sent: Thursday, July 17, 2003 10:41 AM
> To: [EMAIL PROTECTED]
> Subject: Classpath Conundrum (2nd try)
> 
> 
> [I apologize is this message is a dupe.  I had trouble sending
> messages
> to this group from a hotmail account.]
> 
> I have been tasked with trying to get a legacy Java Servlet
> based
> application running under Tomcat 4.1.24 -- The application
> currently
> runs on JRun 2.3.3
> 
> On of the requirements imposed upon me is that I can't disturb
> the
> existing directory structure.  I can't rename or move any
> directories
> (or their contents).
> 
> Our third-party Java classes are in:
> 
>     c:\myapp\foreign
> 
> Our application and development Java classes are in:
> 
>     c:\myapp\native
> 
> The root directory of the web server is:
> 
>     c:\myapp\native\web
> 
> I created the following Context in server.xml:
> 
>     <Context path="/tomcat" docBase="c:/myapp/native/web"
> debug="0"/>
> 
> Then I created the servlet deployment file:
> 
>     c:\myapp\native\web\WEB-INF\web.xml
>     
> The contents of said file:
> 
>     <?xml version="1.0" encoding="ISO-8859-1"?>
> 
>     <!DOCTYPE web-app
>         PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application
> 2.3//EN"
>         "http://java.sun.com/dtd/web-app_2_3.dtd";>
> 
>     <web-app>
> 
>         <servlet>
>             <servlet-name>myapp</servlet-name>
>            
> <servlet-class>com.myapp.servlet.BootStrap</servlet-class>
>         </servlet>
> 
>         <servlet-mapping>
>             <servlet-name>myapp</servlet-name> 
>             <url-pattern>/myapp</url-pattern> 
>         </servlet-mapping>
> 
>     </web-app>
> 
> So now I'm all set to go, except that I'm going to (and did)
> get a
> "class not found" error because there is no "/classes"
> directory under
> "WEB-INF" and as mentioned above I can't copy the classes from
> "/foreign" and "/native" there.  
> 
> I can't create a symbolic link from "/classes" to "/native"
> since that
> would be recursive, and it wouldn't include "/foreign" which
> is also
> required.
> 
> The "/native" and "/foreign" directories are in the CLASSPATH
> environment variable, but as documented in "Class Loader
> HOW-TO" that
> variable is ignored by the class loaders.
> 
> It would seem to me that the easiest and most straight-forward
> solution
> is to get the class loaders to honor the CLASSPATH environment
> variable.  I tried to accomplish this by hacking the start-up
> scripts,
> but could not get it to work.
> 
> Could somebody please help me out here?  What's the best way
> to get the
> class loader to look in "/native" and "/foreign"?  Or is there
> a better
> solution (other than shuffling the directories around, which I
> can't
> do).  Thanks a million!
> 
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 
> 
> 
> NOTICE:  This communication may contain proprietary or other
> confidential
> business information of Orcom Solutions, Inc.  If you are not
> the intended
> recipient or believe that you may have received this
> communication in error,
> please reply to the sender indicating that fact and delete the
> copy you
> received.  In addition, you should not print, copy,
> retransmit, disseminate,
> or otherwise use the information.  Thank you.  
> 
> 
> 


=====

Norris Shelton
Software Engineer
Sun Certified Java 1.1 Programmer
Appriss, Inc.
ICQ# 26487421
AIM NorrisEShelton
YIM norrisshelton


__________________________________
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com

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

Reply via email to