JSF ManagedBean Redirect

    FacesContext facesContext = FacesContext.getCurrentInstance();
    HttpServletResponse res = (HttpServletResponse)facesContext.getExternalContext().getResponse();
    res.setContentType("text/html");
    res.setHeader("Location", location);
    res.setStatus(301);
    facesContext.responseComplete();
Apr 10th, 2009
No comments yet.

Leave a comment

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>