<action
      attribute="studentForm"
      input="/student/addStudent.jsp"
      name="studentForm"
      parameter="add"
      path="/addStudent"
      scope="request"
      type="com.netstars.struts.action.StudentAction">
      <forward
        name="success"
        path="/student/listStudent.jsp"
        redirect="true" />
    </action>
    <action
      attribute="studentForm"
      input="/student/listStudent.jsp"
      name="studentForm"
      parameter="delete"
      path="/deleteStudent"
      scope="request"
      type="com.netstars.struts.action.StudentAction">
      <forward
        name="success"
        path="/student/listStudent.jsp"
        redirect="true" />
    </action>
添加和删除操作采用同一个Action和Form,在Action程序中取parameter属性来区别要进行的操作,String myaction = mapping.getParameter();