Changeset 3775


Ignore:
Timestamp:
Aug 18, 2010, 2:12:28 PM (13 years ago)
Author:
Gregory Vincic
Message:

Fixes #697. This bug was related to a faulty handling of responses working directly on the servlet response such as redirecting users to external sites. The problem was found in ProteiosAction? which did not check if the response was commited or not before trying to reuse the last action to display an error message.

Location:
trunk/client/servlet/src/org/proteios/action
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/client/servlet/src/org/proteios/action/ProteiosAction.java

    r3711 r3775  
    328328      runMe();
    329329      if (getForwardTo() == null && getLayout() == null)
    330         setForwardTo(actionFactory.getLastAction(getEvent()));
     330   {
     331    log.debug("Action didn't set forwardTo nor a layout");
     332    if(!getResponse().isCommitted())
     333    {
     334     log.debug("Action faild, let's try to reuse the last action");
     335        setForwardTo(actionFactory.getLastAction(getEvent()));
     336    }
     337   }
    331338    }
    332339    catch (ItemNotFoundException e)
  • trunk/client/servlet/src/org/proteios/action/hit/ViewActiveHitExternalId.java

    r2478 r3775  
    9898       * Get hit id for error message.
    9999       */
    100       verifySessionAttributes(ViewActiveHit.VHITID);
    101100      Integer hitId = getSessionAttribute(ViewActiveHit.VHITID);
     101   if(hitId!=null) { hitId = getValidInteger(FormFactory.VID); }
     102   
    102103      log.debug("hitId = " + hitId);
    103104      /*
  • trunk/client/servlet/src/org/proteios/action/hit/ViewHitExternalId.java

    r2478 r3775  
    2929
    3030import org.proteios.action.ProteiosAction;
     31import org.proteios.action.ConfigureTableFactory2;
    3132import org.proteios.core.DbControl;
    3233import org.proteios.core.Hit;
     
    8485       */
    8586      setError("Hit[" + hitId + "] - External id is null");
     87   setForwardTo(ConfigureTableFactory2.class);
    8688    }
    8789  }
Note: See TracChangeset for help on using the changeset viewer.