A
avrootshell
I have a Action class which takes care of business logic in struts.
Depending on some condition i'm thinking of forwarding the action
directly to jsp instead of giving path to action mapping.
I was trying to do something like this.
ActionForward af = new ActionForward();
af.setRedirect(true);
af.setPath("/jsp/some.jsp);
return af;
Bcoz i know i can do,[af.setPath = "../app/search");]
It means i can specify action mapping path here.
But this doesnt seem to be working .
One way to do would be like this:
return actionMapping.forward("success");
And in the action mapping in struts-config , i can forward it to jsp.
But i dont want to do this way. Bcoz there are so many conditions and i
dont want so many forwards in struts config .
Is there any way i can forward request to jsp directly?
Any kind of help is appreciated.
Depending on some condition i'm thinking of forwarding the action
directly to jsp instead of giving path to action mapping.
I was trying to do something like this.
ActionForward af = new ActionForward();
af.setRedirect(true);
af.setPath("/jsp/some.jsp);
return af;
Bcoz i know i can do,[af.setPath = "../app/search");]
It means i can specify action mapping path here.
But this doesnt seem to be working .
One way to do would be like this:
return actionMapping.forward("success");
And in the action mapping in struts-config , i can forward it to jsp.
But i dont want to do this way. Bcoz there are so many conditions and i
dont want so many forwards in struts config .
Is there any way i can forward request to jsp directly?
Any kind of help is appreciated.