コード例 #1
0
 public void redirect() throws IllegalStateException {
   String referer = getReferer();
   try {
     ResourceMethod method = router.parse(referer, HttpMethod.GET, request);
     executeMethod(method, result.use(logic()).redirectTo(method.getResource().getType()));
   } catch (ResourceNotFoundException e) {
     result.use(page()).redirect(referer);
   } catch (MethodNotAllowedException e) {
     result.use(page()).redirect(referer);
   }
 }
コード例 #2
0
ファイル: Error404.java プロジェクト: davisnog/prevbolsa
 private void tryMovePermanentlyTo(RequestInfo requestInfo, String newUri) {
   router.parse(newUri, HttpMethod.of(requestInfo.getRequest()), requestInfo.getRequest());
   result.permanentlyRedirectTo(newUri);
 }