protected void success ( PMStrutsContext ctx , String url , boolean redirect ) throws PMForwardException { if ( ctx . getOperation ( ) != null && ctx . getOperation ( ) . getFollows ( ) != null ) { final String plainUrl = PMTags . plainUrl ( ctx . getPmsession ( ) , "/" + ctx . getOperation ( ) . getFollows ( ) + ".do?pmid=" + ctx . getEntity ( ) . getId ( ) ) . substring ( getContextPath ( ) . length ( ) ) ; throw new PMForwardException ( new ActionRedirect ( plainUrl ) ) ; } else { final String plainUrl = PMTags . plainUrl ( ctx . getPmsession ( ) , url ) . substring ( getContextPath ( ) . length ( ) ) ; if ( redirect ) { throw new PMForwardException ( new ActionRedirect ( plainUrl ) ) ; } else { throw new PMForwardException ( new ActionForward ( plainUrl ) ) ; } } }
Consider the operation successful and redirect or forward to the given url