漠小帆 2008-12-25 08:59
浏览 314
已采纳

welcome-file-list里写上要执行的action的url

我在项目中的web.xml中配制


<welcome-file-list>

  <welcome-file>./getDataInfo.action</welcome-file>

</welcome-file-list>

在struts.xml中配制了

<action name="getDataInfo" class="indexAction" method="getDataInfo">

   <result name="success">/manage/index.jsp</result>

</action>

我想在启动服务器后,打开页面http://localhost:8080/erc时出现的是http://localhost:8080/erc/getDataInfo.action

我应该还要怎么修改,才能实现这样的效果?
问题补充

刑天战士 写道
谁让你写./getxxxxx……

那我怎么写?
  • 写回答

5条回答 默认 最新

  • zhuzidian 2008-12-26 23:26
    关注

    web.xml中这样配置

    index.jsp

    然后在index.jsp中使用Struts2的标签
    /s:action

    这个标签会执行这个action,然后返回结果页面.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(4条)

报告相同问题?