You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by "Turner, John" <JT...@AAS.com> on 2003/01/08 11:44:55 UTC

RE: setting up classpath for tomcat running as windows NT service

Tomcat sets it's own classpath...it ignores environment variables except
JAVA_HOME, CATALINA_HOME, and CATALINA_BASE.

If your Tomcat installation or webapp has a problem finding particular
classes, or you suspect that it does, you might want to check the
ClassLoader HOWTO for information on exactly how Tomcat finds classes:

http://jakarta.apache.org/tomcat/tomcat-4.1-doc/class-loader-howto.html

John


-----Original Message-----
From: Manavendra Gupta [mailto:manav@bsil.com] 
Sent: Wednesday, January 08, 2003 5:29 PM
To: Tomcat Users List
Subject: setting up classpath for tomcat running as windows NT service


Hi,

How to setup classpath for tomcat 4.x running as windows NT service?
Apparently, when started, tomcat.exe does not read from "catalina.bat" (or
so i think).

Regards,
Manav.

---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.434 / Virus Database: 243 - Release Date: 12/25/2002
 

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.434 / Virus Database: 243 - Release Date: 12/25/2002
 

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


mod_jk configuration

Posted by Andreas Hirner <an...@projektinter.net>.
Hello,

I have successfully integrated tomcat (4.0.6) with apache (1.3.26) on linux
and I am able to access a single virtual host (e.g. myapplication) located
in the tomcat/webapps/myapplication directory using a url like that:

http://www.mydomain.com/myapplication/index.jsp

However I would like to be able to access the files in that directory
without using the path /myapplication.

I have been playing around with the configuration files but I have not been
able to alter the configuration according to my needs. Does anybody know if
this is possible?

Thanks in advance.

Andreas

PS: The relevant sections of httpd.conf and server.xml are listed below.


http.conf
#########################
<VirtualHost *:80>
   ServerName meinfotoalbum.
   ServerAlias www.meinfotoalbum.com

   DocumentRoot /usr/local/tomcat/mywebapps/meinfoto
   <Directory "/usr/local/tomcat/mywebapps/meinfoto/">
         DirectoryIndex index.htm index.html
        Options Indexes FollowSymLinks
   </Directory>

    #mod_jk link to tomcat
   JkMount / ajp13
   JkMount /* ajp13

   #prohibit access of WEB-INF
    <Location "/WEB-INF/">
        AllowOverride None
        deny from all
   </Location>

    #prohibit access of META-INF
   <Location "/META-INF/">
      AllowOverride None
       deny from all
   </Location>

   </VirtualHost>
################################
server.xml
################################
  <Host name="meinfotoalbum.com" debug="0" appBase="mywebapps"
unpackWARs="true">
    <Alias>www.meinfotoalbum.com</Alias>
    <Logger className="org.apache.catalina.logger.FileLogger"
        directory="logs" prefix="meinfotoalbum_log." suffix=".txt"
        timestamp="true" />
    <Context path="" docBase="meinfoto" debug="0" reloadable="false"/>
    <Listener className="org.apache.ajp.tomcat4.config.ApacheConfig"
        append="true"  />
   </Host>





--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: setting up classpath for tomcat running as windows NT service

Posted by Will Hartung <wi...@msoft.com>.
> From: "Turner, John" <JT...@AAS.com>
> Sent: Wednesday, January 08, 2003 2:44 AM
> Subject: RE: setting up classpath for tomcat running as windows NT service

> Tomcat sets it's own classpath...it ignores environment variables except
> JAVA_HOME, CATALINA_HOME, and CATALINA_BASE.

This is only partially true, and a common misconception. (John, you should
know better.)

Tomcat does indeed go to great lengths to set up its own class loaders, and
catalina.bat/.sh happens to, mostly, ignore CLASSPATH, but that does not
mean the Tomcat does. In many ways, it simply can't.

You can always change catalina.bat/.sh (or not use it at all if you so
desire) to set the CLASSPATH environment variable, or pass the -classpath
parameter on the java command line, and Tomcat will see those classes
through the system class loader.

It is not the recommended way to add classes to Tomcat, but it is still a
viable, and rarely, a necessary option.

Now, how this affects setting up the CLASSPATH for running Tomcat as a NT
service, I haven't a clue. But, FYI and all that y'all.

Regards,

Will Hartung
(willh@msoft.com)





--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>