@Override public void sendRedirect(String location) throws IOException { ((ActionResponse)response).sendRedirect(location); }
@Override public void sendRedirect(String location, String renderUrlParamName) throws IOException { ((ActionResponse)response).sendRedirect(location, renderUrlParamName); }
protected void sendRedirect( ActionRequest actionRequest, ActionResponse actionResponse) throws IOException { String redirect = getRedirect(actionRequest, actionResponse); if (Validator.isNotNull(redirect)) { actionResponse.sendRedirect(redirect); } }
@Override public void sendRedirect(String location) throws IOException { if (!included && (portletResponse instanceof ActionResponse)) { ((ActionResponse) portletResponse).sendRedirect(location); } }
/** * The default behavior of this method is to call * <code>sendRedirect(location)</code> on the wrapped response object. */ public void sendRedirect(String location) throws IOException { response.sendRedirect(location); }
/** * The default behavior of this method is to call * <code>sendRedirect(location, renderUrlParamName)</code> on the wrapped response object. */ public void sendRedirect(String location, String renderUrlParamName) throws IOException { response.sendRedirect(location, renderUrlParamName); }
/** * {@inheritDoc} */ public void sendRedirect(String location) throws IOException { if (response instanceof ActionResponse) { ((ActionResponse) response).sendRedirect(location); } }
public void redirect(String url) throws IOException { if (portletResponse instanceof ActionResponse) { ((ActionResponse) portletResponse).sendRedirect(url); } else { throw new IllegalArgumentException( "RenderResponse does not support redirect(String)."); } }
actionResponse.sendRedirect(redirect);
@Override public void redirect(String url) throws IOException { if (_actionRequest instanceof ActionResponse) { ((ActionResponse) _portletResponse).sendRedirect(url); } else { throw new IllegalArgumentException("Only ActionResponse supported"); } }
public void searchEntry(ActionRequest request, ActionResponse response) { int index = dataCustomerID.indexOf(ParamUtil.getString(request, "customerid")); System.out.println("You are now in method searchEntry " + index); /* perform operation with your data */ response.sendRedirect("/html/customerpage"); }
actionResponse.sendRedirect(redirect);
@ActionMapping("doGotoPage2") public void doGoToPage2(ActionRequest req, ActionResponse resp) { try { resp.sendRedirect("/url/to/page#2"); } catch (IOException ex) { Logger.getLogger(DefaultViewController.class.getName()).log(Level.SEVERE, null, ex); } }
@Override public void processAction(ActionRequest request, ActionResponse response) throws PortletException, IOException { response.sendRedirect("http://www.foo.com"); }
private void exit(PortletRequest request, ActionResponse response, SessionStatus status) { logger.debug("Entering exit"); String exitURL = Constants.EXIT_URL; status.setComplete(); // instead of request.getPortletSession().invalidate() try { response.sendRedirect(exitURL); } catch (IOException ex) { logger.error("Error: IOException: {}", ex.getMessage()); throw new RuntimeException(ex); } logger.debug("Exiting exit"); }
public static void sendRedirect(String arg0) throws IOException { ActionResponse actionResponse = getActionResponse(); if (actionResponse == null) { throw new IllegalStateException( "The response is not ActionResponse."); } actionResponse.sendRedirect(arg0); }
protected void handleExternalRedirect(ExternalRedirect redirect) throws Exception { // issue the redirect to the external URL String url = argumentHandler.createExternalUrl(redirect, responseInstruction.getFlowExecutionKey(), context); // note: no need for response.encodeURL since we're redirecting to an *external* resource response.sendRedirect(url); }
@Override public void send() throws IOException, PortletException { if (response instanceof Response.Redirect) { Response.Redirect redirect = (Response.Redirect)response; super.resp.sendRedirect(redirect.getLocation()); } else { super.send(); } } }
@Override public void send() throws IOException, PortletException { if (response instanceof Response.Redirect) { Response.Redirect redirect = (Response.Redirect)response; super.resp.sendRedirect(redirect.getLocation()); } else { super.send(); } } }
@ActionMapping(params = {"action=savePreferences"}) public void savePreferences( ActionRequest req, ActionResponse res, @RequestParam(required = false) String backgroundImage) throws Exception { imageSetSelectionStrategy.setSelectedImage(req, backgroundImage); // Reirect to a basic HTTP 200 success response to save a full page cycle res.sendRedirect(req.getContextPath() + "/api" + AjaxSuccessController.SUCCESS_URL); } }