[Html] <? Xml version = "1.0" encoding = "UTF-8"?> <! DOCTYPE struts PUBLIC "-// Apache Software Foundation // DTD Struts Configuration 2.0 // EN "" http://struts.apache.org/dtds/struts-2.0.dtd "> <Struts> <! -- Define a constant --> <! -- <Constant name = "struts. devMode "value =" true "/> --> <package name =" front "extends =" struts-default "namespace ="/front "> <action name =" index "> <result>/Namespace. jsp </result> </action> </package> <package name = "main" extends = "struts-default" namespace = "/main"> <action name = "index "class =" Test "> <result name =" main ">/Namespace. jsp </result> </action> </package> </struts> www.2cto.com <span style = "font-family: Arial; BACKGROUND-COLOR: # ffffff"> description: the package is equivalent to the java package, struts. multiple packages with different names can exist in xml. </span> [html] <span style = "font-family: Arial; BACKGROUND-COLOR: # ffffff "> extends is equivalent to the inheritance in java, where it inherits the built-in struts-default.xml file, </span> [html] <span style =" font-family: Arial; BACKGROUND-COLOR: # ffffff "> namespace is the access path, for example, <a href =" http://127.0.0.1:8080/ "> http://127.0.0.1:8080/ </A> project name/main/, </span> [html] <span style = "font-family: Arial; BACKGROUND-COLOR: # ffffff "> action corresponds to the class Name of the specific accessed Action, and the class is followed by the specific action class. </span> [html] <span style =" font-family: arial; BACKGROUND-COLOR: # ffffff "> result is the String value returned by the Action class. The default value is success (actually the value returned by the execute method) </span> [html] <span style = "font-family: Arial; BACKGROUND-COLOR: # ffffff"> </span>