You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by "David C. Hicks" <dh...@i-hicks.org> on 2009/03/13 20:57:40 UTC

To .action or not to .action.

We recently discovered, quite by accident, that we can cause our app 
built on struts2 to NOT display ".action" on any of the URL's.  I'd 
simply like to find out if this is an intended feature or a possible 
defect?  The difference is in how we start off our interaction in the 
browser.  If we use a URL like:

    http://localhost:8080/mysite/login.action

then all of the URL's in the site appear to be suffixed with ".action".  
If, on the other hand, we use:

    http://localhost:8080/mysite/login

then none of the URL's are suffixed with ".action".

We're using Struts 2.1.6 with Tiles 2.0.4 - recently upgraded from some 
prior versions.  We noticed this because our QE department's automated 
testing software freaked out when it couldn't match URL's as it expected.

Thanks,
Dave

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: To .action or not to .action.

Posted by "David C. Hicks" <dh...@i-hicks.org>.
I think Greg answered my question sufficiently - at least, enough for my 
needs.  If you're still interested, I'll try to find a JSP over the 
weekend.  We're not really doing anything strange, though.  It's just 
<s:url> tags, much like the one I posted earlier.

Martin Gainty wrote:
> so you're saying that once .action is appended onto a URL its always in the URL
> sounds like a caching problem
>
> can you include a small jsp with relevant tags so we can reproduce the error?
>
> thanks,
> Martin 
> ______________________________________________ 
> Disclaimer and confidentiality note 
> Everything in this e-mail and any attachments relates to the official business of Sender. This transmission is of a confidential nature and Sender does not endorse distribution to any party other than intended recipient. Sender does not necessarily endorse content contained within this transmission. 
>
>
>
>
>   
>> Subject: Re: To .action or not to .action.
>> From: DEck@holstein.com
>> To: user@struts.apache.org
>> Date: Fri, 13 Mar 2009 16:24:35 -0400
>>
>>
>>
>> I believe it's now the default behavior of struts 2.1.
>>
>>
>>
>> We recently discovered, quite by accident, that we can cause our app
>> built on struts2 to NOT display ".action" on any of the URL's.  I'd
>> simply like to find out if this is an intended feature or a possible
>> defect?  The difference is in how we start off our interaction in the
>> browser.  If we use a URL like:
>>
>>     http://localhost:8080/mysite/login.action
>>
>> then all of the URL's in the site appear to be suffixed with ".action".
>> If, on the other hand, we use:
>>
>>     http://localhost:8080/mysite/login
>>
>> then none of the URL's are suffixed with ".action".
>>
>> We're using Struts 2.1.6 with Tiles 2.0.4 - recently upgraded from some
>> prior versions.  We noticed this because our QE department's automated
>> testing software freaked out when it couldn't match URL's as it expected.
>>
>> Thanks,
>> Dave
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>> For additional commands, e-mail: user-help@struts.apache.org
>>
>>
>>
>>
>> This e-mail and any files transmitted with it are confidential and intended
>> solely for the use of the individual(s) or entity to whom they are addressed.
>>  If you receive this e-mail in error please notify postmaster@holstein.com.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>> For additional commands, e-mail: user-help@struts.apache.org
>>
>>     
>
> _________________________________________________________________
> Hotmail® is up to 70% faster. Now good news travels really fast. 
> http://windowslive.com/online/hotmail?ocid=TXT_TAGLM_WL_HM_70faster_032009
>   

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


RE: To .action or not to .action.

Posted by Martin Gainty <mg...@hotmail.com>.
so you're saying that once .action is appended onto a URL its always in the URL
sounds like a caching problem

can you include a small jsp with relevant tags so we can reproduce the error?

thanks,
Martin 
______________________________________________ 
Disclaimer and confidentiality note 
Everything in this e-mail and any attachments relates to the official business of Sender. This transmission is of a confidential nature and Sender does not endorse distribution to any party other than intended recipient. Sender does not necessarily endorse content contained within this transmission. 




> Subject: Re: To .action or not to .action.
> From: DEck@holstein.com
> To: user@struts.apache.org
> Date: Fri, 13 Mar 2009 16:24:35 -0400
> 
> 
> 
> I believe it's now the default behavior of struts 2.1.
> 
> 
> 
> We recently discovered, quite by accident, that we can cause our app
> built on struts2 to NOT display ".action" on any of the URL's.  I'd
> simply like to find out if this is an intended feature or a possible
> defect?  The difference is in how we start off our interaction in the
> browser.  If we use a URL like:
> 
>     http://localhost:8080/mysite/login.action
> 
> then all of the URL's in the site appear to be suffixed with ".action".
> If, on the other hand, we use:
> 
>     http://localhost:8080/mysite/login
> 
> then none of the URL's are suffixed with ".action".
> 
> We're using Struts 2.1.6 with Tiles 2.0.4 - recently upgraded from some
> prior versions.  We noticed this because our QE department's automated
> testing software freaked out when it couldn't match URL's as it expected.
> 
> Thanks,
> Dave
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> 
> 
> 
> 
> This e-mail and any files transmitted with it are confidential and intended
> solely for the use of the individual(s) or entity to whom they are addressed.
>  If you receive this e-mail in error please notify postmaster@holstein.com.
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> 

_________________________________________________________________
Hotmail® is up to 70% faster. Now good news travels really fast. 
http://windowslive.com/online/hotmail?ocid=TXT_TAGLM_WL_HM_70faster_032009

Re: To .action or not to .action.

Posted by "David C. Hicks" <dh...@i-hicks.org>.
We don't really care whether Struts wants a ".action", or not.  However, 
it's confusing when it seems to pick up the behavior based on the URL 
you used to enter into the system in the first place.  Both URL's that I 
posted in the original note work, but the resulting behavior after the 
fact is different.  That's the part that I'm more concerned about.  
Here's an example of one of the links created on a page:

    <s:url id="deleteUrl" namespace="/customer" action="delete" 
includeParams="none"/>

AFAIK, nothing in this implies that the URL should have an ".action" 
suffix, but if I start my session by going to "login.action" this URL 
will have that suffix.  If I start without the .action, it won't.  Is 
there maybe some way to force Struts to do it one way or the other?  I 
would prefer that the URLs generated be determinant.


Musachy: No, as far as I can tell, we are not using the Convention plugin.


Musachy Barroso wrote:
> I missed that memo :)
>
> musachy
>
> On Fri, Mar 13, 2009 at 4:24 PM,  <DE...@holstein.com> wrote:
>   
>> I believe it's now the default behavior of struts 2.1.
>>
>>
>>
>> We recently discovered, quite by accident, that we can cause our app
>> built on struts2 to NOT display ".action" on any of the URL's.  I'd
>> simply like to find out if this is an intended feature or a possible
>> defect?  The difference is in how we start off our interaction in the
>> browser.  If we use a URL like:
>>
>>    http://localhost:8080/mysite/login.action
>>
>> then all of the URL's in the site appear to be suffixed with ".action".
>> If, on the other hand, we use:
>>
>>    http://localhost:8080/mysite/login
>>
>> then none of the URL's are suffixed with ".action".
>>
>> We're using Struts 2.1.6 with Tiles 2.0.4 - recently upgraded from some
>> prior versions.  We noticed this because our QE department's automated
>> testing software freaked out when it couldn't match URL's as it expected.
>>
>> Thanks,
>> Dave
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>> For additional commands, e-mail: user-help@struts.apache.org
>>
>>
>>
>>
>> This e-mail and any files transmitted with it are confidential and intended
>> solely for the use of the individual(s) or entity to whom they are addressed.
>>  If you receive this e-mail in error please notify postmaster@holstein.com.
>>
>>
>> ---------------------------------------------------------------------
>> 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: To .action or not to .action.

Posted by Musachy Barroso <mu...@gmail.com>.
I missed that memo :)

musachy

On Fri, Mar 13, 2009 at 4:24 PM,  <DE...@holstein.com> wrote:
>
>
> I believe it's now the default behavior of struts 2.1.
>
>
>
> We recently discovered, quite by accident, that we can cause our app
> built on struts2 to NOT display ".action" on any of the URL's.  I'd
> simply like to find out if this is an intended feature or a possible
> defect?  The difference is in how we start off our interaction in the
> browser.  If we use a URL like:
>
>    http://localhost:8080/mysite/login.action
>
> then all of the URL's in the site appear to be suffixed with ".action".
> If, on the other hand, we use:
>
>    http://localhost:8080/mysite/login
>
> then none of the URL's are suffixed with ".action".
>
> We're using Struts 2.1.6 with Tiles 2.0.4 - recently upgraded from some
> prior versions.  We noticed this because our QE department's automated
> testing software freaked out when it couldn't match URL's as it expected.
>
> Thanks,
> Dave
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>
>
>
> This e-mail and any files transmitted with it are confidential and intended
> solely for the use of the individual(s) or entity to whom they are addressed.
>  If you receive this e-mail in error please notify postmaster@holstein.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>



-- 
"Hey you! Would you help me to carry the stone?" Pink Floyd

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: To .action or not to .action.

Posted by Dave Newton <ne...@yahoo.com>.
Becky.L.O'Sullivan@healthnet.com wrote:
> We've been posting our URLs that way (sans .action)

I've been sans action for months now.

Oh, URL mapping; I knew that.

Dave


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: To .action or not to .action.

Posted by Be...@healthnet.com.
We've been posting our URLs that way (sans .action) for a while now and we
love it.  Please don't make it go away.  :)

-B




                                                                           
             DEck@holstein.com                                             
                                                                           
             03/13/2009 01:24                                           To 
             PM                        "Struts Users Mailing List"         
                                       <us...@struts.apache.org>            
                                                                        cc 
             Please respond to                                             
               "Struts Users                                       Subject 
               Mailing List"           Re: To .action or not to .action.   
             <user@struts.apac                                             
                  he.org>                                                  
                                                                           
                                                                           
                                                                           
                                                                           






I believe it's now the default behavior of struts 2.1.



We recently discovered, quite by accident, that we can cause our app
built on struts2 to NOT display ".action" on any of the URL's.  I'd
simply like to find out if this is an intended feature or a possible
defect?  The difference is in how we start off our interaction in the
browser.  If we use a URL like:

    http://localhost:8080/mysite/login.action

then all of the URL's in the site appear to be suffixed with ".action".
If, on the other hand, we use:

    http://localhost:8080/mysite/login

then none of the URL's are suffixed with ".action".

We're using Struts 2.1.6 with Tiles 2.0.4 - recently upgraded from some
prior versions.  We noticed this because our QE department's automated
testing software freaked out when it couldn't match URL's as it expected.

Thanks,
Dave

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org




This e-mail and any files transmitted with it are confidential and intended
solely for the use of the individual(s) or entity to whom they are
addressed.
 If you receive this e-mail in error please notify postmaster@holstein.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org





---------------------------------------------------------------------
This message, together with any attachments, is
intended only for the use of the individual or entity
to which it is addressed. It may contain information
that is confidential and prohibited from disclosure.
If you are not the intended recipient, you are hereby
notified that any dissemination or copying of this
message or any attachment is strictly prohibited. If
you have received this message in error, please notify
the original sender immediately by telephone or by
return e-mail and delete this message, along with any
attachments, from your computer. Thank you.

---------------------------------------------------------------------

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: To .action or not to .action.

Posted by DE...@holstein.com.

I believe it's now the default behavior of struts 2.1.



We recently discovered, quite by accident, that we can cause our app
built on struts2 to NOT display ".action" on any of the URL's.  I'd
simply like to find out if this is an intended feature or a possible
defect?  The difference is in how we start off our interaction in the
browser.  If we use a URL like:

    http://localhost:8080/mysite/login.action

then all of the URL's in the site appear to be suffixed with ".action".
If, on the other hand, we use:

    http://localhost:8080/mysite/login

then none of the URL's are suffixed with ".action".

We're using Struts 2.1.6 with Tiles 2.0.4 - recently upgraded from some
prior versions.  We noticed this because our QE department's automated
testing software freaked out when it couldn't match URL's as it expected.

Thanks,
Dave

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org




This e-mail and any files transmitted with it are confidential and intended
solely for the use of the individual(s) or entity to whom they are addressed.
 If you receive this e-mail in error please notify postmaster@holstein.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: To .action or not to .action.

Posted by Musachy Barroso <mu...@gmail.com>.
Are you using the Convention plugin?

musachy

On Fri, Mar 13, 2009 at 3:57 PM, David C. Hicks <dh...@i-hicks.org> wrote:
> We recently discovered, quite by accident, that we can cause our app built
> on struts2 to NOT display ".action" on any of the URL's.  I'd simply like to
> find out if this is an intended feature or a possible defect?  The
> difference is in how we start off our interaction in the browser.  If we use
> a URL like:
>
>   http://localhost:8080/mysite/login.action
>
> then all of the URL's in the site appear to be suffixed with ".action".  If,
> on the other hand, we use:
>
>   http://localhost:8080/mysite/login
>
> then none of the URL's are suffixed with ".action".
>
> We're using Struts 2.1.6 with Tiles 2.0.4 - recently upgraded from some
> prior versions.  We noticed this because our QE department's automated
> testing software freaked out when it couldn't match URL's as it expected.
>
> Thanks,
> Dave
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>



-- 
"Hey you! Would you help me to carry the stone?" Pink Floyd

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: To .action or not to .action.

Posted by dusty <du...@yahoo.com>.
This is a gift from Mr. Don Brown back when he was working on the REST
plugin.  I remember people asking for it.  Speaking of mrdon, where's he
been?  Maybe Atlassian is working him hard these days.  ;-p



Musachy Barroso wrote:
> 
> It is not a bug, it is a feature! /friday
> 
> musachy
> 
> On Fri, Mar 13, 2009 at 5:56 PM, Greg Lindholm <gl...@yahoo.com>
> wrote:
>>
>>
>>
>> dchicks wrote:
>>>
>>> We recently discovered, quite by accident, that we can cause our app
>>> built on struts2 to NOT display ".action" on any of the URL's.  I'd
>>> simply like to find out if this is an intended feature or a possible
>>> defect?  The difference is in how we start off our interaction in the
>>> browser.  If we use a URL like:
>>>
>>>     http://localhost:8080/mysite/login.action
>>>
>>> then all of the URL's in the site appear to be suffixed with ".action".
>>> If, on the other hand, we use:
>>>
>>>     http://localhost:8080/mysite/login
>>>
>>> then none of the URL's are suffixed with ".action".
>>>
>>> We're using Struts 2.1.6 with Tiles 2.0.4 - recently upgraded from some
>>> prior versions.  We noticed this because our QE department's automated
>>> testing software freaked out when it couldn't match URL's as it
>>> expected.
>>>
>>>
>>
>> There was a change sometime between Struts 2.0.11 and Struts 2.1.6 where
>> the
>> default list of action extensions (struts.action.extension) changed from
>> just 'action' to 'action' plus "" (no extension).  This will cause
>> requests
>> with no extension to be treated as an action.
>>
>> The old (2.0.11) struts default.properties had:
>>    struts.action.extension=action
>>
>> The new (2.1.6) has:
>>    struts.action.extension=action,,
>>
>> You can explicitly set the extension back to just 'action' then It works
>> like it used to.
>>
>> In struts.xml I added: <constant name="struts.action.extension"
>> value="action" />
>>
>>
>> --
>> View this message in context:
>> http://www.nabble.com/To-.action-or-not-to-.action.-tp22503987p22504765.html
>> Sent from the Struts - User mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>> For additional commands, e-mail: user-help@struts.apache.org
>>
>>
> 
> 
> 
> -- 
> "Hey you! Would you help me to carry the stone?" Pink Floyd
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/To-.action-or-not-to-.action.-tp22503987p22519875.html
Sent from the Struts - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: To .action or not to .action.

Posted by Musachy Barroso <mu...@gmail.com>.
It is not a bug, it is a feature! /friday

musachy

On Fri, Mar 13, 2009 at 5:56 PM, Greg Lindholm <gl...@yahoo.com> wrote:
>
>
>
> dchicks wrote:
>>
>> We recently discovered, quite by accident, that we can cause our app
>> built on struts2 to NOT display ".action" on any of the URL's.  I'd
>> simply like to find out if this is an intended feature or a possible
>> defect?  The difference is in how we start off our interaction in the
>> browser.  If we use a URL like:
>>
>>     http://localhost:8080/mysite/login.action
>>
>> then all of the URL's in the site appear to be suffixed with ".action".
>> If, on the other hand, we use:
>>
>>     http://localhost:8080/mysite/login
>>
>> then none of the URL's are suffixed with ".action".
>>
>> We're using Struts 2.1.6 with Tiles 2.0.4 - recently upgraded from some
>> prior versions.  We noticed this because our QE department's automated
>> testing software freaked out when it couldn't match URL's as it expected.
>>
>>
>
> There was a change sometime between Struts 2.0.11 and Struts 2.1.6 where the
> default list of action extensions (struts.action.extension) changed from
> just 'action' to 'action' plus "" (no extension).  This will cause requests
> with no extension to be treated as an action.
>
> The old (2.0.11) struts default.properties had:
>    struts.action.extension=action
>
> The new (2.1.6) has:
>    struts.action.extension=action,,
>
> You can explicitly set the extension back to just 'action' then It works
> like it used to.
>
> In struts.xml I added: <constant name="struts.action.extension"
> value="action" />
>
>
> --
> View this message in context: http://www.nabble.com/To-.action-or-not-to-.action.-tp22503987p22504765.html
> Sent from the Struts - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>



-- 
"Hey you! Would you help me to carry the stone?" Pink Floyd

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: To .action or not to .action.

Posted by "David C. Hicks" <dh...@i-hicks.org>.
Greg Lindholm wrote:
> There was a change sometime between Struts 2.0.11 and Struts 2.1.6 where the
> default list of action extensions (struts.action.extension) changed from
> just 'action' to 'action' plus "" (no extension).  This will cause requests
> with no extension to be treated as an action.
>   
Ah! So, once you send the request with no extension, the URLs generated 
in the jsp's will also have no extension? I can accept that. It was jut 
confusing when I first encountered it. Thanks for the tip on how to set 
it explicitly!

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: To .action or not to .action.

Posted by Greg Lindholm <gl...@yahoo.com>.


dchicks wrote:
> 
> We recently discovered, quite by accident, that we can cause our app 
> built on struts2 to NOT display ".action" on any of the URL's.  I'd 
> simply like to find out if this is an intended feature or a possible 
> defect?  The difference is in how we start off our interaction in the 
> browser.  If we use a URL like:
> 
>     http://localhost:8080/mysite/login.action
> 
> then all of the URL's in the site appear to be suffixed with ".action".  
> If, on the other hand, we use:
> 
>     http://localhost:8080/mysite/login
> 
> then none of the URL's are suffixed with ".action".
> 
> We're using Struts 2.1.6 with Tiles 2.0.4 - recently upgraded from some 
> prior versions.  We noticed this because our QE department's automated 
> testing software freaked out when it couldn't match URL's as it expected.
> 
> 

There was a change sometime between Struts 2.0.11 and Struts 2.1.6 where the
default list of action extensions (struts.action.extension) changed from
just 'action' to 'action' plus "" (no extension).  This will cause requests
with no extension to be treated as an action.

The old (2.0.11) struts default.properties had:
    struts.action.extension=action

The new (2.1.6) has:
    struts.action.extension=action,,

You can explicitly set the extension back to just 'action' then It works
like it used to.

In struts.xml I added: <constant name="struts.action.extension"
value="action" />


-- 
View this message in context: http://www.nabble.com/To-.action-or-not-to-.action.-tp22503987p22504765.html
Sent from the Struts - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org