Reputation:
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>
Upvotes: 3
Views: 605
Reputation: 270
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
.
Upvotes: 1