You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Matthew Hixson <hi...@poindextrose.org> on 2002/11/26 09:26:44 UTC

path mapping

I have a web application that is currently running under Resin.  We may 
need to migrate our app to Tomcat/JBoss.  I'm wondering if there is an 
equivalent feature in Tomcat that allows us to do the same thing as 
Resin's path-mapping directive.

http://www.caucho.com/resin/ref/app-config.xtp#path-mapping

This feature allows us to do things like this:

<path-mapping url-regexp="/(stage/)?(.*\.jsp)$" 
real-path="$app-dir/jsp/wap/$2"/>

Which causes Resin to map all requests that end with .jsp into the 
jsp/wap directory under wherever our webapp's war file has been 
expanded to.
   Or, more simply, is there a way to get Tomcat to map requests like 
*.jsp into our /jsp directory of our webapp?  I've looked through the 
documentation and couldn't find the answer to this.
   Thanks for any help,
     -M@

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


Re: path mapping

Posted by "Craig R. McClanahan" <cr...@apache.org>.

On Tue, 26 Nov 2002, Matthew Hixson wrote:

> Date: Tue, 26 Nov 2002 14:43:20 -0800
> From: Matthew Hixson <hi...@poindextrose.org>
> Reply-To: Tomcat Users List <to...@jakarta.apache.org>
> To: Tomcat Users List <to...@jakarta.apache.org>
> Subject: Re: path mapping
>
> Okay, so Tomcat implements the spec and nothing but the spec then,
> correct?

With respect to <servlet-mapping>, that is correct.

You could implement path mapping functionality in at least a couple of
different ways:

* For Tomcat standalone (or any other Servlet 2.3 container),
  you could implement a Filter that does this sort of thing.

* You can run Tomcat behind Apache and use Apache's
  mod_rewrite or mod_alias facilities to do the remapping.

>    Thanks,
>     -M@

Craig


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


Re: path mapping

Posted by Matthew Hixson <hi...@poindextrose.org>.
Okay, so Tomcat implements the spec and nothing but the spec then, 
correct?
   Thanks,
    -M@

On Tuesday, November 26, 2002, at 07:39 AM, Jeanfrancois Arcand wrote:

> See section 11 of the Servlet Specification:
>
> http://jcp.org/aboutJava/communityprocess/first/jsr154/
>
> -- Jeanfrancois
>
> Matthew Hixson wrote:
>
>> I have a web application that is currently running under Resin.  We 
>> may need to migrate our app to Tomcat/JBoss.  I'm wondering if there 
>> is an equivalent feature in Tomcat that allows us to do the same 
>> thing as Resin's path-mapping directive.
>>
>> http://www.caucho.com/resin/ref/app-config.xtp#path-mapping
>>
>> This feature allows us to do things like this:
>>
>> <path-mapping url-regexp="/(stage/)?(.*\.jsp)$" 
>> real-path="$app-dir/jsp/wap/$2"/>
>>
>>
>> Which causes Resin to map all requests that end with .jsp into the 
>> jsp/wap directory under wherever our webapp's war file has been 
>> expanded to.
>>   Or, more simply, is there a way to get Tomcat to map requests like 
>> *.jsp into our /jsp directory of our webapp?  I've looked through the 
>> documentation and couldn't find the answer to this.
>>   Thanks for any help,
>>     -M@
>>
>> -- 
>> To unsubscribe, e-mail:   
>> <ma...@jakarta.apache.org>
>> For additional commands, e-mail: 
>> <ma...@jakarta.apache.org>
>>
>
>
> --
> To unsubscribe, e-mail:   
> <ma...@jakarta.apache.org>
> For additional commands, e-mail: 
> <ma...@jakarta.apache.org>
>


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


Re: path mapping

Posted by Jeanfrancois Arcand <jf...@apache.org>.
See section 11 of the Servlet Specification:

http://jcp.org/aboutJava/communityprocess/first/jsr154/

-- Jeanfrancois

Matthew Hixson wrote:

> I have a web application that is currently running under Resin.  We 
> may need to migrate our app to Tomcat/JBoss.  I'm wondering if there 
> is an equivalent feature in Tomcat that allows us to do the same thing 
> as Resin's path-mapping directive.
>
> http://www.caucho.com/resin/ref/app-config.xtp#path-mapping
>
> This feature allows us to do things like this:
>
> <path-mapping url-regexp="/(stage/)?(.*\.jsp)$" 
> real-path="$app-dir/jsp/wap/$2"/>
>
>
> Which causes Resin to map all requests that end with .jsp into the 
> jsp/wap directory under wherever our webapp's war file has been 
> expanded to.
>   Or, more simply, is there a way to get Tomcat to map requests like 
> *.jsp into our /jsp directory of our webapp?  I've looked through the 
> documentation and couldn't find the answer to this.
>   Thanks for any help,
>     -M@
>
> -- 
> To unsubscribe, e-mail:   
> <ma...@jakarta.apache.org>
> For additional commands, e-mail: 
> <ma...@jakarta.apache.org>
>


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