Hi
Can anybody here help me forwarding a request in one controlloer to another controller?
cheers
Prins
Hi
Can anybody here help me forwarding a request in one controlloer to another controller?
cheers
Prins
You can call the handleRequest method on any controller:
There may be conflicts when setting different caching semantics in these two controllers although that is probably unusual in most applications.Code:public class ... extends AbstractController { private Controller someController = null; public void setSomeController(Controller ctrl) { this.someController = ctrl; } protected ModelAndView handleRequestInternal(HttpServletRequest request, HttpServletResponse response) throws Exception { return this.someController.handleRequest(request, response); } }
Ok, not 100% sure of this, but may aim is to do: when i am preparing to show a formView (ControllerPage1.jsp) (as a property of Controller1) and i it doesnt fulfill the conditions and thus i want to pass it to Controller2 and let Controller2 show its formView(ControllerPage2.jsp).
Dont know if you know what im meaning
cheers
Prins
You need an org.springframework.web.servlet.view.InternalResou rceViewOriginally Posted by prinsinn
Bob
Ok, now we are getting somewhere devijvers, now im able to redirect from controller1 to controller2, display controller2īs view, but when i submit in controller2 i get the request/onsubmit action into controller1!
Any clue?
cheers
Prins