tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mon Cab <futo...@yahoo.com>
Subject Re: Forwarding based on URI's in Tomcat
Date Wed, 01 Aug 2007 19:45:25 GMT
I tried the following 

 <servlet-mapping>
    <servlet-name>action</servlet-name>
    <url-pattern>*.do</url-pattern>
  </servlet-mapping>
   <servlet-mapping>
      <servlet-name>action</servlet-name>
      <url-pattern>/sexy*</url-pattern>
  </servlet-mapping>

but got a 404 message: 

The requested resource (/mymodule/sexy) is not available.

I also tried:

<servlet-mapping>
      <servlet-name>action</servlet-name>
      <url-pattern>/mymodule/sexy*</url-pattern>
  </servlet-mapping>

but I got the same error. 




--- David Delbecq <delbd+jakarta@oma.be> wrote:

> In your web.xml, you can map /foo  and /bar to struts servlet.
> However,
> i think i remember the struts servlet does not like to be mapped at
> several location. (/foo, /bar and *.do)
> 
> You could also write your own servlet, that your map to /foo and /bar
> and which take th request url and does an internal forward to the
> same
> name with an additionnal .do
> 
> You could also map / to your struts servlet (instead of *.do) and
> have
> static content served using a servlet mapped to /static. But you will
> have problem with pure JSPs as you will need to manually map them.
> 
> 
> 
> Mon Cab a écrit :
> > I am trying to get tomcat to forward requests as follows
> >
> > www.mysite.com/foo to direct to the foo action  
> > www.mysite.com/bar to direct to bar action ie. bar.do
> >
> > Does anyone have any pointers on this?  Sorry for the newbie
> question. 
> >
> >
> >        
> >
>
____________________________________________________________________________________
> > Looking for a deal? Find great prices on flights and hotels with
> Yahoo! FareChase.
> > http://farechase.yahoo.com/
> >
> >
> ---------------------------------------------------------------------
> > 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
> 
> 



       
____________________________________________________________________________________
Building a website is a piece of cake. Yahoo! Small Business gives you all the tools to get
online.
http://smallbusiness.yahoo.com/webhosting 

---------------------------------------------------------------------
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


Mime
View raw message