You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Phillip Kuzma <ph...@planetguide.com> on 2001/02/05 21:10:43 UTC

Questions

I'm currently running apache + mod_jk + tomcat.

I put all my servlets in /usr/java/tomcat/webapps/ROOT/web-inf/classes/

I put all my jsp files in /usr/java/tomcat/webapps/ROOT/

When i goto my domain I goto www.domain.com/servlet and it reads the
servlets dir
When I goto my domain I goto www.domain.com/*.jsp and it reads the jsp
directory.

How do I change my servlet directory to say "/www/world/servlets"
 How do I change my jsp directory to say  "/www/world/jsp"

please CC me any replies/suggestions/comments.

THANK-YOU
Phil



Re: Questions

Posted by Phillip Kuzma <ph...@planetguide.com>.
Ok I did you said and it worked great thanks, but now how about.

i have www.domain1.com:8080 and www.domain2.com:8080 and I want


domain1.com:8080 servlets to be in /www/domain1/servlets/Hello.class

(www.domain1.com:8080/servlets/Hello)

domain2.com:8080 servlets to be in /www/domain2/servlets/Hello.class

(www.domain2.com:8080/servlets/Hello)

I got hello.jsp to work in /www/domain1(or 2)/, but not Hello.class

Thanks


Re: Questions

Posted by John Golubenko <go...@columbiafunds.com>.
Easy. Edit 2 files.
First under 
%TOMCAT_HOME%/conf/server.xml
In ContextManager (you'll see similar stuff)
put this:

<Context path="/path_after_domain"
		docBase="/www/world"
		crossContext="false"
		debug = "0" <!-- 0 to 9 -->	
		reloadable = "true"
</Context>

So, now assuming you have /www/world directory.
You can make up shell script, to do the job next time like this one I 
have,
and execute it in /www/world directory.

#!/bin/sh
# Must be executed in main directory of 
# docBase parameter of servlet.xml.


mkdir WEB-INF;
mkdir WEB-INF/classes;
mkdir META-INF;
ln -s WEB-INF/classes servlets;
cp %TOMCAT_HOME%/webapps/ROOT/META-INF/MANIFEST.MF META-INF/
cp %TOMCAT_HOME%/webapps/ROOT/WEB-INF/web.xml WEB-INF/web.xml


Or do that by hand...
good luck.
John.



>>>>>>>>>>>>>>>>>> Original Message <<<<<<<<<<<<<<<<<<

On 2/5/01, 12:10:43 PM, "Phillip Kuzma" <ph...@planetguide.com> wrote 
regarding Questions:


> I'm currently running apache + mod_jk + tomcat.

> I put all my servlets in /usr/java/tomcat/webapps/ROOT/web-inf/classes/

> I put all my jsp files in /usr/java/tomcat/webapps/ROOT/

> When i goto my domain I goto www.domain.com/servlet and it reads the
> servlets dir
> When I goto my domain I goto www.domain.com/*.jsp and it reads the jsp
> directory.

> How do I change my servlet directory to say "/www/world/servlets"
>  How do I change my jsp directory to say  "/www/world/jsp"

> please CC me any replies/suggestions/comments.

> THANK-YOU
> Phil



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

NOTICE:  This communication may contain confidential or other privileged information.  If you are not the intended recipient, or believe that you have received this communication in error, please do not print, copy, retransmit, disseminate, or otherwise use the information.  Also, please indicate to the sender that you have received this email in error, and delete the copy you received.  Any communication that does not relate to official Columbia business is that of the sender and is neither given nor endorsed by Columbia.  Thank you.