Hy, I have a code who intercept all request(GET & POST), and eventually redirect to another page, with a form. I want that when the user post the form, the initial intercepted request is executed
My actual code:
public void doFilter(ServletRequest originalRequest, ServletResponse res, FilterChain chain){
originalRequest.getRequestDispatcher("/message").forward(request, res);
}
...
@RequestMapping("/message", method=GET)
public void showMessageForm(...){
...
}
@RequestMapping("/message", method=POST)
public void messageOk(ServletResponse res, ModelAndView mav){
//redirect to the originalRequest.
????
}
The originalRequest can be both GET or POST. If it's a post, I want the content of the form to be transmit too.
Thank you !