You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by bu...@apache.org on 2004/12/30 00:20:20 UTC
DO NOT REPLY [Bug 32882] New: -
incorrect global ActionMapping 'inheritance' when you use multiple struts config files
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=32882>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=32882
Summary: incorrect global ActionMapping 'inheritance' when you
use multiple struts config files
Product: Struts
Version: 1.2.4
Platform: PC
OS/Version: Windows XP
Status: NEW
Severity: major
Priority: P2
Component: Digester
AssignedTo: dev@struts.apache.org
ReportedBy: lukasz_public@racon.pl
If you use a custom (global) action-mapping in the <action-mappings> element
and you use a multiple struts-config files, the custom mapping has a wider use
than I it should. It applies to action mappings in other struts config files
which are processed later (unless they overwrite it).
For example if you define module with 2 configuration files:
<init-param>
<param-name>config</param-name>
<param-value>
/WEB-INF/struts-config.xml,
/WEB-INF/test/struts-config.xml
</param-value>
</init-param>
and if first one defined global action mapping like here:
<struts-config>
<action-mappings type="com.mapping.test.AuthActionMapping">
</action-mappings>
</struts-config>
and the second one does not define global mapping:
<struts-config>
<action-mappings>
<action path="/test" forward="/test.jsp"/>
</action-mappings>
</struts-config>
then the second one "inherits" the global config form first one.
Action '/test' will use AuthActionMapping instead of ActionMapping.
If you want to check it - just add test.jsp with:
ActionMapping is instance of: <%= request.getAttribute
("org.apache.struts.action.mapping.instance").getClass().getName() %>
Remark:
If we decide to change this behaviour we should warn users � that if they have
used multiple config files and defined global action mapping class and if they
decided to upgrade - their action may now have different ActionMappings
associated.
PS. patch will follow soon
--
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org