You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by "Niall Pemberton (JIRA)" <ji...@apache.org> on 2006/04/28 07:27:19 UTC
[jira] Commented: (STR-2795) Postback Forms - Caching and Modules
[ http://issues.apache.org/struts/browse/STR-2795?page=comments#action_37234 ]
Niall Pemberton commented on STR-2795:
--------------------------------------
OK its a while since I looked at this, but....
1) I agree this doesn't make sense - but TagUtils.getActionMappingName() doesn't remove the module prefix so if you have a "module" uri - something like "/myModule/myAction.do" then when it tries to lookup the ActionMapping it uses "/myModule/myAction" rather than "/myAction" when it calls moduleConfig.findActionConfig() and the mapping is not found.
2) A tag's attributes/properties are managed by the container and shouldn't be modified - the only places the action attribute is cleared is in the release() method - but there is no guarantee this gets called between every use of the tag - since its up to the container the pooling strategy is uses, when the properties are set and when release is called - see the java docs for the release method:
http://java.sun.com/j2ee/1.4/docs/api/javax/servlet/jsp/tagext/Tag.html#release()
I tried this on Tomcat and got the wrong url rendered from a cached instance of the Tag.
> 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: Don Brown
>
> 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
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org