[英]struts2 redirecting to default action when working with tiles
i have index.jsp like this 我有这样的index.jsp
<% response.sendRedirect("home.action"); %>
i want to invoke that action like http://localhost:8080/Myapp
我想调用该动作,例如
http://localhost:8080/Myapp
but i want to remove index.jsp and i tried with 但是我想删除index.jsp并且尝试了
<default-action-ref name="home"/>
<action name ="home"----
but i got 404 error specifying that the action doesnot exist What to do in this case ? 但是我收到404错误,指出该操作不存在,在这种情况下该怎么办? when i am putting a breakpoint in the action (class) control is not coming to action so i think that
<default-action-ref name="home"/>
is not working 当我在动作(类)控件中放置断点时,该动作无法起作用,因此我认为
<default-action-ref name="home"/>
无效
Please provide some helpful inputs? 请提供一些有用的输入?
I don't thinks it's a good idea but it will fulfill your requirement. 我认为这不是一个好主意,但可以满足您的要求。
<action name="">
<result type="redirectAction">home</result>
</action>
There is a Simple Logic Which I've Used 我已经使用了一个简单的逻辑
<action name="regi">
<result name="success" type="tiles">regi.tiles</result>
</action>
<action name="registration" class="com.regform">
<result name="success" type="redirect">regi.action</result>
</action>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.