There are fine different types of actions in the struts
i) Forward Action (to forward a request to another resource in your
application)
ii) Include Action ( To include some action )
application)
ii) Include Action ( To include some action )
You Might be wondering what the difference between Forward Action and Include
Action so here it is : The difference is that you need to use the IncludeAction
only if the action is going to be included by another action or JSP. Use
ForwardAction to forward a request to another resource in your application such
as a Servlet that already does business logic processing or even another JSP
page.
Action so here it is : The difference is that you need to use the IncludeAction
only if the action is going to be included by another action or JSP. Use
ForwardAction to forward a request to another resource in your application such
as a Servlet that already does business logic processing or even another JSP
page.
iii) Dispatch Action ( to group related actions into one class)
iv) Lookup Dispatch Action (is useful if the method name in the Action is not
driven by its name in the front end but by the Locale independent key into the
resource bundle.)
iv) Lookup Dispatch Action (is useful if the method name in the Action is not
driven by its name in the front end but by the Locale independent key into the
resource bundle.)
The difference between LookupDispatchAction and DispatchAction is that the
actual method that gets called in LookupDispatchAction is based on a lookup of a
key value instead of specifying the method name directly.
actual method that gets called in LookupDispatchAction is based on a lookup of a
key value instead of specifying the method name directly.
v) Switch Action (The SwitchAction class provides a means to switch from a
resource in one module to another resource in a different module. SwitchAction
is useful only if you have multiple modules in your Struts application. The
SwitchAction class can be used as is without extending.)
resource in one module to another resource in a different module. SwitchAction
is useful only if you have multiple modules in your Struts application. The
SwitchAction class can be used as is without extending.)
0 comments:
Post a Comment