Any particular reason you are performing a redirect (I'm assuming you are
using this as a command link) rather than just using a standard output link?

Regardless of the answer, I am in agreement with David.  One suggestion I
can make is to be sure you encode the redirect url with the
response.encodeRedirectURL() method.  To redirect to an external site
outside of the application context, you will need to supply an absolute URL.

HTH,
CD


On 3/29/07, David Delbecq <[EMAIL PROTECTED]> wrote:

This is the way to go. However it will throw an exception is response
has already been committed.
also the url must be either full ("http://......";) either an url
relative to current webapplication.

Sorin Silaghi a écrit :
> Hello,
>
>       This is a really easy one.. how can i redirect from the backing
> bean to something that is not jsf... like to an external link for
> example ???
>
> I've tried the whole
>
>             HttpServletResponse response = (HttpServletResponse)
> facesContext.getExternalContext().getResponse();
>             response.sendRedirect(url);
>             facesContext.responseComplete();
>
> but it dosen't work the way I expect it to.. I presume this just
> redirects to another JSF page right ? ... so how do I convince it to
> go to google.com <http://google.com> for example ???


Reply via email to