myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Richard Yee <richard.k....@gmail.com>
Subject Re: How to make redirect to page with another context?
Date Sat, 24 Oct 2009 20:34:03 GMT
If you want to do it programmatically from an action,
You can try this method

/**
* Redirect to a new url
* @param url an external url
*/
void redirect(String url) throws IOException{
FacesContext facesContext = FacesContext.getCurrentInstance();
ExternalContext externalCtx = facesContext.getExternalContext();
externalCtx.redirect( url);
}

-Richard


On Sat, Oct 24, 2009 at 4:32 AM, Anton Gavazuk <antongavazuk@gmail.com> wrote:
> Hi all,
>
> actually, question is in the subject: How to make redirect from JSF
> application to a page with another context, like www.google.com
>
> Thanks,
> Anton
>

Mime
View raw message