I am a noob to Struts framework. I am trying to understand how action-mapping works exactly. Suppose I have a JavaScript file that sends an AJAX request:
The relationship is made by the name
attribute in the action config. So if you use name="testForm"
then form bean with the name testForm
will be injected to the action's execute method.
Your request might be handled if the relative url match the path value in action config and you have mapped the action servlet to *.do
in servlet mapping pattern.
The type
attribute of the
is used to enter FQCN of the bean class that would probably extend the ActionForm
. It's needed by Struts to be able to instantiate a bean when required.