<!DOCTYPE struts PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 2.0//EN" "http://struts.apache.org/dtds/struts-2.0.dtd"> <struts> <package name="default" extends="struts-default"> <action name="numberCheck" class="NumberCheckAction"> <result name="success">/success.jsp</result> <result name="failure">/failure.jsp</result> </action> </package> </struts>
Actions in struts are grouped into packages.
Struts.xml file contains more than one package.
<package name="default"
extends="struts-default">
A package must extends the struts-default
package that defined in struts-default.xml. struts-default.xml configured with
various features like interceptors (to instantiate action object by using
request parameters, result types etc.,). So by extending struts-default.xml, we
are inheriting the features of struts-default.xml into current package.
No comments:
Post a Comment