You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Miguel Galves <mg...@gmail.com> on 2006/07/12 16:33:24 UTC
Action names whithout .do
I was wondering: is it possible to define call actions without using the .do
in the URL ?
Like www.yyy.com/search instead of www.yyy.com/search.do ?
If yes, how do I have to configure my web.xml and struts-config.xml files ?
[]s
Miguel
--
Miguel Galves - Engenheiro de Computação
Já leu meus blogs hoje?
Para geeks http://log4dev.blogspot.com
Pra pessoas normais
http://miguelgalves.blogspot.com
"Não sabendo que era impossível, ele foi lá e fez..."
Re: Action names whithout .do
Posted by Ted Husted <hu...@apache.org>.
"www.yyy.com/do/search" is supported, if you'd like to use that.
Just use a pattern like /do/* in the web.xml instead of *.do.
It's *not* supported by modules, though.
-Ted.
On 7/12/06, Miguel Galves <mg...@gmail.com> wrote:
> I was wondering: is it possible to define call actions without using the .do
> in the URL ?
> Like www.yyy.com/search instead of www.yyy.com/search.do ?
> If yes, how do I have to configure my web.xml and struts-config.xml files ?
>
> []s
>
> Miguel
>
> --
> Miguel Galves - Engenheiro de Computação
> Já leu meus blogs hoje?
> Para geeks http://log4dev.blogspot.com
> Pra pessoas normais
> http://miguelgalves.blogspot.com
>
> "Não sabendo que era impossível, ele foi lá e fez..."
>
--
HTH, Ted.
* http://www.husted.com/struts/
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: Action names whithout .do
Posted by Bart Busschots <ba...@so-4pt.net>.
No, I use the pattern of /do/nameOfAction and the struts tags have no
problem with that at all.
Lance wrote:
> You might find that the struts tags (eg <html:form>) rely on the *.do
> convention so you may have to manually generate <form> tags etc.
>
> -----Original Message-----
> From: Akshay Ahooja [mailto:akshayahooja@gmail.com]
> Sent: 12 July 2006 15:40
> To: Struts Users Mailing List
> Subject: Re: Action names whithout .do
>
> I believe you would have to change your URL Pattern in Web.XML
>
> ex.
> Change
>
> <servlet-mapping>
> <servlet-name>action</servlet-name>
> <url-pattern>*.do</url-pattern>
> </servlet-mapping>
>
> To:
>
> <servlet-mapping>
> <servlet-name>action</servlet-name>
> <url-pattern>/search/*</url-pattern>
> </servlet-mapping>
>
>
> It might make more sense to use a more general pattern such as:
>
> <servlet-mapping>
> <servlet-name>action</servlet-name>
> <url-pattern>/go/*</url-pattern>
> </servlet-mapping>
>
> And then you can use /go/search for your search action...
>
> HTH,
>
> Akshay
>
>
>
> On 7/12/06, Miguel Galves <mg...@gmail.com> wrote:
>
>> I was wondering: is it possible to define call actions without using the
>> .do
>> in the URL ?
>> Like www.yyy.com/search instead of www.yyy.com/search.do ?
>> If yes, how do I have to configure my web.xml and struts-config.xml files
>> ?
>>
>> []s
>>
>> Miguel
>>
>> --
>> Miguel Galves - Engenheiro de Computação
>> Já leu meus blogs hoje?
>> Para geeks http://log4dev.blogspot.com
>> Pra pessoas normais
>> http://miguelgalves.blogspot.com
>>
>> "Não sabendo que era impossível, ele foi lá e fez..."
>>
>>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
RE: Action names whithout .do
Posted by Lance <la...@marketpipe.com>.
You might find that the struts tags (eg <html:form>) rely on the *.do
convention so you may have to manually generate <form> tags etc.
-----Original Message-----
From: Akshay Ahooja [mailto:akshayahooja@gmail.com]
Sent: 12 July 2006 15:40
To: Struts Users Mailing List
Subject: Re: Action names whithout .do
I believe you would have to change your URL Pattern in Web.XML
ex.
Change
<servlet-mapping>
<servlet-name>action</servlet-name>
<url-pattern>*.do</url-pattern>
</servlet-mapping>
To:
<servlet-mapping>
<servlet-name>action</servlet-name>
<url-pattern>/search/*</url-pattern>
</servlet-mapping>
It might make more sense to use a more general pattern such as:
<servlet-mapping>
<servlet-name>action</servlet-name>
<url-pattern>/go/*</url-pattern>
</servlet-mapping>
And then you can use /go/search for your search action...
HTH,
Akshay
On 7/12/06, Miguel Galves <mg...@gmail.com> wrote:
>
> I was wondering: is it possible to define call actions without using the
> .do
> in the URL ?
> Like www.yyy.com/search instead of www.yyy.com/search.do ?
> If yes, how do I have to configure my web.xml and struts-config.xml files
> ?
>
> []s
>
> Miguel
>
> --
> Miguel Galves - Engenheiro de Computação
> Já leu meus blogs hoje?
> Para geeks http://log4dev.blogspot.com
> Pra pessoas normais
> http://miguelgalves.blogspot.com
>
> "Não sabendo que era impossível, ele foi lá e fez..."
>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: Action names whithout .do
Posted by Akshay Ahooja <ak...@gmail.com>.
I believe you would have to change your URL Pattern in Web.XML
ex.
Change
<servlet-mapping>
<servlet-name>action</servlet-name>
<url-pattern>*.do</url-pattern>
</servlet-mapping>
To:
<servlet-mapping>
<servlet-name>action</servlet-name>
<url-pattern>/search/*</url-pattern>
</servlet-mapping>
It might make more sense to use a more general pattern such as:
<servlet-mapping>
<servlet-name>action</servlet-name>
<url-pattern>/go/*</url-pattern>
</servlet-mapping>
And then you can use /go/search for your search action...
HTH,
Akshay
On 7/12/06, Miguel Galves <mg...@gmail.com> wrote:
>
> I was wondering: is it possible to define call actions without using the
> .do
> in the URL ?
> Like www.yyy.com/search instead of www.yyy.com/search.do ?
> If yes, how do I have to configure my web.xml and struts-config.xml files
> ?
>
> []s
>
> Miguel
>
> --
> Miguel Galves - Engenheiro de Computação
> Já leu meus blogs hoje?
> Para geeks http://log4dev.blogspot.com
> Pra pessoas normais
> http://miguelgalves.blogspot.com
>
> "Não sabendo que era impossível, ele foi lá e fez..."
>