You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Tim <mi...@gmail.com> on 2007/12/04 07:58:11 UTC

How to config tomcat 5.5 to display project in sub directory in url

Hi,
I want to display my project "projectName" in the url like
http://localhost/aa/projectName.
There's only one project "projectName" on the host. I know how to
deploy it to http://localhost/projectName directly under the host but
how to tell tomcat about the path "/aa"in the middle?
I tried to write context:
<Context docBase="....war" path="/aa/projectName" reloadable="true"/>
in "\conf\Catalina\localhost\projectName.xml" but doesn't help.
Appreciate if any one can help.

tomcat version 5.5.25, the project is with tapestry+spring+hibernate.

Cheers

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: How to config tomcat 5.5 to display project in sub directoryinurl

Posted by Mark Thomas <ma...@apache.org>.
Caldarale, Charles R wrote:
>> From: Christopher Schultz [mailto:chris@christopherschultz.net] 
>> Subject: Re: How to config tomcat 5.5 to display project in 
>> sub directoryinurl
>>
>> Recently, I have seen that folks are referring to the Wiki. Do we have
>> redundant sources of information out there?
> 
> Numerous, especially if you include the non-Apache ones.  The Tomcat FAQ
> does link to the WIKI for some of its information.

We have just moved all of the FAQ to the Wiki. I expect the FAQ section of
the docs will be removed shortly.

Mark



---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


RE: How to config tomcat 5.5 to display project in sub directoryinurl

Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: Christopher Schultz [mailto:chris@christopherschultz.net] 
> Subject: Re: How to config tomcat 5.5 to display project in 
> sub directoryinurl
> 
> Recently, I have seen that folks are referring to the Wiki. Do we have
> redundant sources of information out there?

Numerous, especially if you include the non-Apache ones.  The Tomcat FAQ
does link to the WIKI for some of its information.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
MATERIAL and is thus for use only by the intended recipient. If you
received this in error, please contact the sender and delete the e-mail
and its attachments from all computers.

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: How to config tomcat 5.5 to display project in sub directoryin url

Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Chuck,

Caldarale, Charles R wrote:
>> From: Christopher Schultz [mailto:chris@christopherschultz.net] 
>> Subject: Re: How to config tomcat 5.5 to display project in 
>> sub directoryin url
>>
> <snip>
>> Can I nominate this as a FAQ?
> <snip>
>> Can I nominate this as a FAQ answer?
> 
> Fine by me.  Note that the above information actually is in the doc for
> <Context> for both 5.5 and 6.0, but it's probably easy to miss.

Obviously, since we get this question about once per week. The FAQ has
very little in the way of "deployment" questions:

http://tomcat.apache.org/faq/deployment.html

Recently, I have seen that folks are referring to the Wiki. Do we have
redundant sources of information out there?

- -chris

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFHVW9v9CaO5/Lv0PARApxeAKCWZVjjXvM0d0bUtiJV+gutgsHlDACgibVc
xyCC1YmUa9+46Wf9kYUxfw0=
=Pd7k
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


RE: How to config tomcat 5.5 to display project in sub directoryin url

Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: Christopher Schultz [mailto:chris@christopherschultz.net] 
> Subject: Re: How to config tomcat 5.5 to display project in 
> sub directoryin url
> 
<snip>
> Can I nominate this as a FAQ?
<snip>
> Can I nominate this as a FAQ answer?

Fine by me.  Note that the above information actually is in the doc for
<Context> for both 5.5 and 6.0, but it's probably easy to miss.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
MATERIAL and is thus for use only by the intended recipient. If you
received this in error, please contact the sender and delete the e-mail
and its attachments from all computers.

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: How to config tomcat 5.5 to display project in sub directory in url

Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Chuck,

Caldarale, Charles R wrote:
>> From: Tim [mailto:mitstalks@gmail.com] 
>> Subject: How to config tomcat 5.5 to display project in sub 
>> directory in url
>>
>> I tried to write context:
>> <Context docBase="....war" path="/aa/projectName" reloadable="true"/>
>> in "\conf\Catalina\localhost\projectName.xml" but doesn't help.

Can I nominate this as a FAQ?

> 2) Make sure the .war file for the webapp is located somewhere other
> than in the <Host> appBase directory, or you'll get the webapp deployed
> twice, and insure that docBase points there.
> 
> 3) Change the name of projectName.xml to aa#projectName.xml (yes, that's
> a number sign in the middle of the file name).

Can I nominate this as a FAQ answer?

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFHVW0t9CaO5/Lv0PARAs9EAJ4ldoMTfPjviN0ZtBY9P7h2pZp/ZgCgjPI/
jp6l7KgLCYEZCYnM45i/CwQ=
=fxEH
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


RE: How to config tomcat 5.5 to display project in sub directory in url

Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: Tim [mailto:mitstalks@gmail.com] 
> Subject: How to config tomcat 5.5 to display project in sub 
> directory in url
> 
> I tried to write context:
> <Context docBase="....war" path="/aa/projectName" reloadable="true"/>
> in "\conf\Catalina\localhost\projectName.xml" but doesn't help.

1) Take out the path attribute, it can't be used when the <Context>
element is in this location.

2) Make sure the .war file for the webapp is located somewhere other
than in the <Host> appBase directory, or you'll get the webapp deployed
twice, and insure that docBase points there.

3) Change the name of projectName.xml to aa#projectName.xml (yes, that's
a number sign in the middle of the file name).

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
MATERIAL and is thus for use only by the intended recipient. If you
received this in error, please contact the sender and delete the e-mail
and its attachments from all computers.

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org