例:
  在struts-config.xml文件中配置如下 :
    <form-beans >
       <form-bean name="showGoodsForm" type="com.pl.struts.form.ShowGoodsForm" />
 <action-mappings >
     <action
      path="/showGoods"
      type="com.pl.struts.action.ShowGoodsAction"
      name="showGoodsForm"
      scope="request">
     <forward name="display" path="/WEB-INF/jsp/content/showGoods.jsp" />
    </action>
    
 </action-mappings>   注意:path="/showGoods“,你输入的路径只要为/showGoods.do,那么就会被拦截,去执行你所定义的Action,本例中的定义如下:type="com.pl.struts.action.ShowGoodsAction",那么程序将去执行ShowGoodsAction类,你可以在这个类中添加你想执行的代码