For example if a user types types a URL http://www.learnerandtutor.com/struts2/actions/method.action in that /struts2/action is namespace and method.action is the action name.
While naming a namespace we have to keep the below points in mind.
<package name="serveAll" namespace="" extends="struts-default"> . . . </package>
One useful example of this default is we can handle all the unknown requests with the the simple setup like below.
<package name="serveAll" namespace="" extends="struts-default"> <action name="*"> <result>/error.jsp</result> </action> </package>
What we done is, if any requested action is not found simply responding with error page instead of file not found error. That’s why we put the action name as *. So even if the user types an action name asdasdasd it will respond with error.jsp . Even we can use wild card characters also in action name. In later chapters we will work on wild char characters in action names.
]]>