A friendly place for programming greenhorns!
Big Moose Saloon
Search
|
Java FAQ
|
Recent Topics
Register / Login
JavaRanch
»
Java Forums
»
Java
»
JSF
Author
JSF redirect to another page
Andus Chan
Greenhorn
Joined: Apr 15, 2011
Posts: 7
posted
Jun 13, 2011 21:25:35
0
Hi,
I'm new comer in
JSF
. I found there are 3 kinds of method in Backing Bean to redirect to another page.
1st:
return "/home?faces-redirect=true";
2nd:
FacesContext fContext = FacesContext.getCurrentInstance(); ExternalContext extContext = fContext.getExternalContext(); extContext.redirect("http://hostname/TEST/home.jsf");
3rd:
FacesContext fContext = FacesContext.getCurrentInstance(); ExternalContext extContext = fContext.getExternalContext(); extContext.redirect(extContext.getRequestContextPath() + "/home.jsf");
What are the differences in the server side or client side for these 3 methods?
Can the same session be shared after "redirect"?
Thanks in advance!
I agree. Here's the link:
http://ej-technologies/jprofiler
- if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
subject: JSF redirect to another page
Similar Threads
<h:commandLink> rendered not updating on logout
Call spring controller from faces-config.xml
Navigation from JSF page to Non JSF page
how we forward a JSF page into Servlet
redirect without http:// or http: ecc
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter