Action class is where all the action happens in framework. Framework look for the request and matches it to available Actions and if it finds any it determine how to process the request.
In web application, Action name attribute is matched to find the exact resource to execute for given request.
Here ‘strutsapp’ is Context Root which will be different for different application, hello is the action name which framework will look for in application for mapping.
The action mapping specifies a class, set of result types, a set of exception handlers, and an interceptor stack. Only the name attribute is required. The other attributes can also be provided at package scope.
<action name="Login" class="com.login"> <result name="success">/success.jsp</result> <result name="input">/login.jsp</result> </action>
Here “Login” is the action name. when framework finds any request with this action name e.g: ‘localhost:8080/root/Login.do’. Framework will know that given request is for above action mapping and invoke the class ‘com.login.java’ and after processing the class it will forward the request to either ‘success.jsp’ or ‘login.jsp’ depending on the return type from action.