This week's book giveaway is in the General Computing forum.
We're giving away four copies of Arduino in Action and have Martin Evans, Joshua Noble, and Jordan Hochenbaum on-line!
See this thread for details.
The moose likes JSF and the fly likes Redirct of JSF page Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


JavaRanch » Java Forums » Java » JSF
Reply Bookmark "Redirct of JSF page" Watch "Redirct of JSF page" New topic
Author

Redirct of JSF page

Jeff Calusinski
Greenhorn

Joined: Apr 21, 2005
Posts: 6
I am using Rational App Dev and I am trying to figure out how to get my JSF page to redirect to another page if all of the required information is not present. I am trying to prevent errors when a user bookmarks my JSF pages. I mention Rational, because when JSF pages are created, the backing bean is an auto generated bean in the pagecode package.

Cheers
-Jeff
Bauke Scholtz
Ranch Hand

Joined: Oct 08, 2006
Posts: 2458
Let the action method return a String. This will be handled by the navigation case in the faces-config.

Basic example:

JSF

MyBean

faces-config.xml


Code depot of a Java EE / JSF developer | JSF / Eclipse / Tomcat kickoff tutorial | DAO kickoff tutorial | I ♥ Unicode
Sudhakar Guntaka
Ranch Hand

Joined: Nov 21, 2004
Posts: 46
Hello Jeff,

Bauke's post seems to be a good solution. Does that solve your problem?

cheers,
Sudhakar
 
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: Redirct of JSF page
 
Similar Threads
Problem passing parameters from one page to another.
modeling JSF managed beans on component diagram
JSF navigation questions
Creating Drop Down lists in datagrid client component
Setting Bean property