比如
<action path="/HelloWorld" type="hello.HelloAction"
name="HelloForm" scope="request" validate="true"
input="/hello.jsp">
<forward name="SayHello" path="/hello.jsp" />
</action>
可以通過
mapping.findForward("SayHello") 轉向hello.jsp
new ActionForward ("hello.jsp")與它效果一樣
只是上面的寫法規範一點 方便配置
傳值:用new ActionForward的方式返回你要返回的頁面並帶上一個參數如:url?success=1,然後在url的頁面中用下面語句彈出窗口:
<c:if test="${param.success=='1'}">
<script>
alert("你要提示的信息");//或用window.open彈出一個新窗體
</script>
</c:if>