我在项目中的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
我应该还要怎么修改,才能实现这样的效果?
问题补充
web.xml中这样配置
index.jsp
然后在index.jsp中使用Struts2的标签
/s:action
这个标签会执行这个action,然后返回结果页面.
谁让你写./getxxxxx……
当进入首页index.jsp中的时候自动转发到你想去的页面不就完事了吗?用js或者forward不都行吗?
写个空白的HTML
onload="window.location='./logonOptions.htm'" 改成 ACTION 请求
呵呵 同样的问题,一样的问过,一样没有好的解决办法,但是 里可以配置servlet 没法配置action