Announcement Announcement Module
No announcement yet.
Handling exceptions in Spring webflow using ajax. Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • Handling exceptions in Spring webflow using ajax.

    My application is using spring MVC + Spring Webflow and in that case when i am going to reder a flow which is using ajax the application timeout occurs and i am handling the exception occured during timeout in flow handler . During this exception i am trying to redirect the flow to the default flow within Abstractflow handler using the following code.
    public String handleException(FlowException flowException, HttpServletRequest request, HttpServletResponse response) {
    Exception exception = (Exception)findRootCause(flowException.getCause()) ;
    String errorCode = null;
    if (flowException instanceof NoSuchFlowExecutionException) {
    BookingException bookingException=new BookingException(flowException);
    request.setAttribute(WebKeys.BUSINESS_ERROR,bookin gException );
    return "/ibe/login";
    return "/ibe/booking";

    In the normal flow it gets redirected to the given url but in the case of ajax flow its adding &fragments"somename" to the redirected URL so the url becomes "/ibe/login&fragments omename". Why this is happening.

    Due to this issue i am not able to render a viw while application timeout occurs in ajax flow.
    Last edited by nishanth007joy; Mar 22nd, 2010, 05:58 AM.

  • #2
    I want to know how the redirect can be done while in the case of an ajax call in spring web flow.