'In Struts 1, What is the Default Value of Type Attribute of <action> tag?
In Struts 1, if the type attribute of the <action> tag has no value, what does it mean? Is there a default value for the type attribute that is used when it is not explicitly specified.
I'm basically trying to figure out what the following action does; as you can see it has no type attribute; it only has path and forward attributes:
<action path="/a/b/comp" forward="/components/d/my-comp.jsp">
</action>
Solution 1:[1]
The action that you have included above simply redirects from /a/b/comp.do to /components/d/my-comp.jsp. It is a shorthand for the following:
<action path="/a/b/comp"
parameter="/components/d/my-comp.jsp"
type="org.apache.struts.actions.ForwardAction">
</action>
So, for the action that you have included the type attribute is org.apache.struts.actions.ForwardAction.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Roman C |
