You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by "Thomas Kwan (eTechFocus)" <th...@etechfocus.com> on 2007/08/17 05:28:27 UTC
Register url in ROOT application
I am using tomcat 5.5. I have a application with the context "/app1"
already.
But I want to register a servlet in the ROOT application to service
request to the URI "/app1".
Is it possible?
thanks
---------------------------------------------------------------------
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: Register url in ROOT application
Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Chuck and Thomas,
Caldarale, Charles R wrote:
>> From: Thomas Kwan (eTechFocus) [mailto:thomask@etechfocus.com]
>> Subject: Re: Register url in ROOT application
>>
>> I want to be able to register a servlet in the ROOT application
>> that will handle request to "/app1". Note that the name space
>> "/app1" is already taken up by my "app1" application.
[snip]
> If you are front-ending Tomcat with httpd, I think you could also use
> URL rewriting in httpd to get the request to go where you want it.
Better yet, you can simply do this:
JkMount /app1 your-root-worker
JkMount /app1/* your-app1-worker
No rewriting necessary!
- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFGxbMS9CaO5/Lv0PARAmvYAKCaXbR3H6HA/UygbxUvQCDekFRmEACdEc22
FvTVqGP/Zxq4rXhD9C8RwJc=
=hgOC
-----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: Register url in ROOT application
Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: Thomas Kwan (eTechFocus) [mailto:thomask@etechfocus.com]
> Subject: Re: Register url in ROOT application
>
> I want to be able to register a servlet in the ROOT application
> that will handle request to "/app1". Note that the name space
> "/app1" is already taken up by my "app1" application.
I don't see any direct way to do this. There are a couple of indirect
mechanisms that should work, but both depend on using something other
than "app1" under ROOT; we'll use "app1r" in the following:
1) Put a welcome page in the app1 webapp that redirects to /app1r; this
exposes the renaming to the client, which may be undesirable.
2) Use a filter in the app1 webapp that forwards the request to /app1r;
this requires enabling cross-context, which should not be a problem.
3) Use a valve at the <Host> level to forward the request to /app1r;
this would be Tomcat-specific, but would avoid changes to app1.
If you are front-ending Tomcat with httpd, I think you could also use
URL rewriting in httpd to get the request to go where you want it.
- 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: Register url in ROOT application
Posted by "Thomas Kwan (eTechFocus)" <th...@etechfocus.com>.
Sorry for not being clear. Here is what I want.
I have an web application and its name is "app1". It has multiple
servlets registered in its web.xml already. For example, there
are servlets running at /app1/servlet1, /app1/servlet2...etc
I want to be able to register a servlet in the ROOT application
that will handle request to "/app1". Note that the name space
"/app1" is already taken up by my "app1" application.
thanks again
thomas
Caldarale, Charles R wrote:
>> From: Thomas Kwan (eTechFocus) [mailto:thomask@etechfocus.com]
>> Subject: Register url in ROOT application
>>
>> I am using tomcat 5.5. I have a application with the context
>> "/app1" already. But I want to register a servlet in the ROOT
>> application to service request to the URI "/app1".
>>
>
> Not sure what you're asking for. If all you want is your app1 to be the
> default webapp, just delete the existing ROOT directory (or ROOT.war),
> and rename your app1 to ROOT.
>
> If that's not what you want, please try to explain the problem again.
>
> - 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
>
>
>
---------------------------------------------------------------------
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: Register url in ROOT application
Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: Thomas Kwan (eTechFocus) [mailto:thomask@etechfocus.com]
> Subject: Register url in ROOT application
>
> I am using tomcat 5.5. I have a application with the context
> "/app1" already. But I want to register a servlet in the ROOT
> application to service request to the URI "/app1".
Not sure what you're asking for. If all you want is your app1 to be the
default webapp, just delete the existing ROOT directory (or ROOT.war),
and rename your app1 to ROOT.
If that's not what you want, please try to explain the problem again.
- 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