You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Rodro <ro...@ibi.com> on 2009/03/06 20:18:00 UTC

Tomcat URL masking question...

Dear Tomcat Users.
I'm trying to do a URL masking on Tomcat 5.5.25.

What I specifically want to do is:

I execute (call) an app with the following URL:
http://localhost:8080/ibi_apps/WFServlet?IBIF_ex=carinst
(see the attached image)

Now, I need to mask the URL to get the same result calling the app as:
http://localhost:8080/car

i.e. mask "/ibi_apps/WFServlet?IBIF_ex=3Dcarinst"  as "/car".

Is this possible?
and if so,
Where shall I set this masking?

Apreciatte your help on this.
Kind regards. http://www.nabble.com/file/p22378836/carinst.jpg 
-- 
View this message in context: http://www.nabble.com/Tomcat-URL-masking-question...-tp22378836p22378836.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


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


Re: Tomcat URL masking question...

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

Rodro,

On 3/10/2009 7:54 PM, Rodro wrote:
> Dear Chuck.
> I tried to implement #2 as you suggested, using urlrewrite as in
> http://tuckey.org/urlrewrite/manual/2.6
> Under "Install" I see on STEP 1:    “Download the zip (or tar.gz) and
> extract it into your context'sdirectory ie, so that urlrewrite.xml goes into
> the WEB-INF directory”. 
> 
> However, looking into my file directory I found 6 WEB-INF directories:
> C:\Archivos de programa\Apache Software Foundation\Tomcat 5.5\webapps
>   ROOT
>   tomcat-docs
>   admin
>   host-manager
>   manager
>
> In which one should I extract the zip file into?

You don't seem to have your own application deployed. Where do you have
your own application deployed? From your previous post, it would seem
that it should be under webapps/ibi_apps, but it's not shown here.

You have two options for deployment of the urlrewrite library:

1. Under the ROOT webapp. Here, you'd map URLs of the form:

   /car(.*)?   ->    /ibi_apps\1


2. Under a new webapp deployed to "/car". Here, you'd use:

   (.*)?      -> /ibi_apps\1

So it depends on how you choose to do your deployment. Did you want to
just make short URLs available to users, or do you actually want all
your URLs to look like "/car" and not change to anything else in the URL
bar of the client's browser?

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

iEYEARECAAYFAkm4OMwACgkQ9CaO5/Lv0PAb5gCgvrrG4juKjMkEzq616ZgHP5vr
ICAAnRstEVN8QPTII7Zzt0j1V5PNpnWW
=d781
-----END PGP SIGNATURE-----

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


RE: Tomcat URL masking question...

Posted by Rodro <ro...@ibi.com>.
Dear Chuck.
I tried to implement #2 as you suggested, using urlrewrite as in
http://tuckey.org/urlrewrite/manual/2.6
Under "Install" I see on STEP 1:    “Download the zip (or tar.gz) and
extract it into your context'sdirectory ie, so that urlrewrite.xml goes into
the WEB-INF directory”. 

However, looking into my file directory I found 6 WEB-INF directories:
C:\Archivos de programa\Apache Software Foundation\Tomcat 5.5\webapps\ROOT
C:\Archivos de programa\Apache Software Foundation\Tomcat
5.5\webapps\tomcat-docs
C:\Archivos de programa\Apache Software Foundation\Tomcat
5.5\server\webapps\admin
C:\Archivos de programa\Apache Software Foundation\Tomcat
5.5\server\webapps\host-manager
C:\Archivos de programa\Apache Software Foundation\Tomcat
5.5\server\webapps\manager
C:\Archivos de programa\Apache Software Foundation\Tomcat
5.5\webapps\tomcat-docs\appdev\sample\web 

In which one should I extract the zip file into?
Thanks and regards.
Rodrigo.


Caldarale, Charles R wrote:
> 
>> From: Rodro [mailto:rodrigo_allende@ibi.com]
>> Subject: Tomcat URL masking question...
>>
>> I execute (call) an app with the following URL:
>> http://localhost:8080/ibi_apps/WFServlet?IBIF_ex=carinst
>> (see the attached image)
>>
>> Now, I need to mask the URL to get the same result calling the app as:
>> http://localhost:8080/car
> 
> It's not "masking" by any usual definition that you want.
> 
> You have a couple of easy choices:
> 
> 1) Deploy a webapp named "car" that does a redirect or forward to the
> desired URL.
> 
> 2) Implement a filter in your default webapp that is triggered by the /car
> <url-pattern> that does the redirect or forward.
> 
> You may find this useful as a variation of #2:
> http://tuckey.org/urlrewrite/
> 
>  - 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 unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Tomcat-URL-masking-question...-tp22378836p22446181.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


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


RE: Tomcat URL masking question...

Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: Rodro [mailto:rodrigo_allende@ibi.com]
> Subject: Tomcat URL masking question...
>
> I execute (call) an app with the following URL:
> http://localhost:8080/ibi_apps/WFServlet?IBIF_ex=carinst
> (see the attached image)
>
> Now, I need to mask the URL to get the same result calling the app as:
> http://localhost:8080/car

It's not "masking" by any usual definition that you want.

You have a couple of easy choices:

1) Deploy a webapp named "car" that does a redirect or forward to the desired URL.

2) Implement a filter in your default webapp that is triggered by the /car <url-pattern> that does the redirect or forward.

You may find this useful as a variation of #2:
http://tuckey.org/urlrewrite/

 - 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 unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org