This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
Dear friend i am new to struts2 me want to redirect my action with in the action class without using Struts.XML
let suppose my requested URL is
http://localhost:8080/my/jsp/myidex.jsp internally from action class without changing the URL in the browser. Like filter in Spring
sorry if me cant explain you clearly but if any one know please post some material
Lets us see if my understanding is correct.
your config xml looks like
Usually in your action class, you will return ActionForward object by calling mapping.findForward("success") to go to "/myindex.jsp"
If you want to redirect to some other page without specifying in config xml,
you will get actionforward object by instantiating it with your new path and return it.
Joined: Sep 29, 2010
thanks brother for your reply..
but my question is little bit different..
actually me want to internally redirect my request to any action without feel changing my URL to user.
Let me explain more clearly
my requested URL is
http://localhost:8080/my/myindex.action me call this action then request will go in the myindex.action class
from that class me want to internally redirect to some other action class e.g
http://localhost:8080/my/home.action and do some process and takes value from that then com back to
means internally redirect
hope me define some more clear picture...
sorry if there is any confusion
You can use interceptors to perform task that you want .
In interceptor you can call any Action .
A small leak can sink a Gigantic ship.>
Joined: Sep 29, 2010
dear brother you suggested me to use interceptor.
now the problem i am facing is that me can only call interceptor before or after result..
how we can manually call a interceptor a specific point in the action..
let suppose me in the action class
public String execute()
in the method after execute me want to call interceptor and pass some parameters to interceptor...
and in the interceptor on behalf of the parameter i can do further processing then i can send any data(List) back to action..
thank in advance
and sorry if any confusion occur