L
lightning
It's in a LookupDispatchAction's subclass,and it's very simple,when
user click "cancle",
go to the referer url:
code:
@Override
protected ActionForward cancelled(ActionMapping mapping, ActionForm
form, HttpServletRequest request, HttpServletResponse response) throws
Exception {
response.sendRedirect(request.getHeader("Referer"));
return null;
}
but struts give the exception:
java.lang.IllegalStateException: Cannot forward after response has
been committed
how can I do that?
user click "cancle",
go to the referer url:
code:
@Override
protected ActionForward cancelled(ActionMapping mapping, ActionForm
form, HttpServletRequest request, HttpServletResponse response) throws
Exception {
response.sendRedirect(request.getHeader("Referer"));
return null;
}
but struts give the exception:
java.lang.IllegalStateException: Cannot forward after response has
been committed
how can I do that?