<package name="struts" extends="struts-default">
<!-- class 为该action实现的类 -->
<action name="login" class="struts2.loginaction">
<result name="success" >
/success.jsp
</result>
<result name="error" >
/error.jsp
</result>
</action>
</package>
action为这个action的名字 class为要实现的类