Heidi Lilybeth
Heidi Lilybeth

Reputation: 127

JSF redirect to another web project

How can I redirect from one project to another web projects. I know how to redirect but only on the same projects, well usually the code for redirecting is something like this:

FacesContext context = FacesContext.getCurrentInstance();
    context.getExternalContext().redirect("login.xhtml");

Well what happen here is that it call the backing bean to initialize or whatsoever.. My boss want me to link all projects to make it as one application the problem is how can I interconnect this projects and redirect the link to these projects I know it a redirection but I don't have any idea how can I make this possible, any idea guys?

Upvotes: 2

Views: 1789

Answers (1)

BalusC
BalusC

Reputation: 1109132

Just provide an absolute URL instead of a relative URL. I.e. start with http:// and so on.

externalContext.redirect("http://stackoverflow.com");

Upvotes: 5

Related Questions