You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@struts.apache.org by "Niall Pemberton (JIRA)" <ji...@apache.org> on 2006/05/09 01:03:34 UTC

[jira] Reopened: (STR-2795) Postback Forms - Caching and Modules

     [ http://issues.apache.org/struts/browse/STR-2795?page=all ]
     
Niall Pemberton reopened STR-2795:
----------------------------------

     Assign To: Niall Pemberton  (was: Don Brown)

The reason the current way is bad is because containers think they control setting the tags attributes and are free to implement whatever tag pooling strategy they think best. In the case of Tomcat it caches and re-use tags with the same attribute settings - without calling the property setters or the reset() method. As postback forms set the "action" attribute to the current uri, this means that if the tag is reused that incorrect uri gets rendered. This is easily re-created in Tomcat - which I did in the struts-examples webapp while testing the patch I'm about to commit.

I'm re-opening this and will commit a patch for this bug shortly.



> Postback Forms - Caching and Modules
> ------------------------------------
>
>          Key: STR-2795
>          URL: http://issues.apache.org/struts/browse/STR-2795
>      Project: Struts Action 1
>         Type: Bug

>   Components: Taglibs
>     Versions: Nightly Build
>  Environment: Operating System: other
> Platform: Other
>     Reporter: Niall Pemberton
>     Assignee: Niall Pemberton

>
> I experimented with a postback form in the struts-examples exercise modules and 
> found two problems:
> 1) Postback forms take no account of modules so when the FormTag lookup() 
> method calls TagUtils.getActionMappingName() it doesn't find the action.
> 2) More seriously, postback forms don't take into account the fact that servlet 
> containers cache Tags. The way "postback" has been implemented, by setting 
> the "action" attribute, is not going to work properly when the FormTag is 
> cached and re-used on a different form.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/struts/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira