在web.xml中配置action的方法

第一步  Struts.xml中

<action name="go" class="com.action.MyAction">

   <result name="success">/next.jsp</result>

</action>

第二步   在webRoot中創建一個go.action的空文件,什么內容也不用寫

 

第三步就是在web.xml中的welcome-file節點中加上剛才新建的go.action的空文件名就OK了

<welcome-file-list>
<welcome-file>go.action</welcome-file>
</welcome-file-list>

 

第四步  重新启动服务器  輸入http://IP:端口/项目名称 回车

posted @ 2012-04-13 00:27  食神  阅读(747)  评论(0编辑  收藏  举报