protected void redirectToReferrer ( ) { String referrer = context . requestHeader ( "Referer" ) ; referrer = referrer == null ? context . contextPath ( ) /*injector.getInstance(DeploymentInfo.class).getContextPath()*/ : referrer ; redirect ( referrer ) ; }
Redirects to referrer if one exists . If a referrer does not exist it will be redirected to the root of the application .