日期:2014-05-20  浏览次数:20743 次

strus问题
求助~~ 问题如下:

abc.do 是我的action。
( web.xml配置成
  <welcome-file-list>
  <welcome-file>index.jsp</welcome-file>
  </welcome-file-list>
  在IE地址栏中输入“http://localhost:8080/ ” 可以直接调用我的那个index.jsp页面。
 ) 

那么如果我在web.xml文件中直接配置成如下样式:
  
  <welcome-file-list>
  <welcome-file>abc.do</welcome-file>
  </welcome-file-list>

在IE地址栏中输入“http://localhost:8080/ ” 可以直接调用我的那个action么?




------解决方案--------------------
貌似不可以直接配置为***.do的形式,不过可以曲线救国
XML code

<welcome-file-list> 
     <welcome-file>index.jsp </welcome-file> 
    </welcome-file-list>

------解决方案--------------------
只要在index.jsp里面写一段话就可以了
Java code

<%
    response.sendRedirect("/test/abc.do"); [color=#FF0000]//这里的具体路径你根据自己的情况写了[/color]
%>

------解决方案--------------------
没错 你可以在index.jsp理加上这段
<c:redirect url="/abc.do">