Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
The moose likes JSF and the fly likes Flow being lost Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSF
Bookmark "Flow being lost" Watch "Flow being lost" New topic

Flow being lost

Sean Hetfield
Ranch Hand

Joined: Dec 01, 2003
Posts: 83
I have set up three .jsp pages (input.jsp and output.jsp and error.jsp).

On the input.jsp I have a listbox � single select. When the submit button is clicked, based on the value chosen, input.jsp is directed to the correct page. In the submit button action handler, I have placed the following code:

Note: I changed the actual names of the classes and methods.

public String doButton1Action() {
SomeClass ilClass = new SomeClass();
java.lang.String ilString = getListbox1().getValue().toString(); //value of the listbox

return "input"; //navigates to the correct page
else if(ilString.equals("111"))
java.lang.String ilValue = ilClass.AssembleAReallyLongString();
requestScope.put("P", ilValue); //I�ve even tried to hard code a literal but that doesn�t work either
return "success"; //navigates to the correct page
return "fail"; //navigates to the correct page


In output.jsp, I�ve declared a requestScope scripting variable called P of type java.lang.String and bound it to an output control. The output.jsp output control�s format is String.

In input.jsp, I tried both ways by declaring and not declare a requestScope scripting variable called P.

With either case, the String will not display in the output.jsp control that I bound the requestScope scripting P to.

Am I going about this wrong? Would you have any suggestions?

Any help is appreciated.
Bauke Scholtz
Ranch Hand

Joined: Oct 08, 2006
Posts: 2458
What is requestScope and where does it come from?

Anyway, it looks like a weird way to pass values from one to other page. What exactly do you want to achieve? Is the managed bean request or session scoped? Can you show some snippets of the relevant JSF code?
Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 63868


There aren't many rules that you need to worry about here on the Ranch, but one that we take very seriously regards the use of proper names. Please take a look at the JavaRanch Naming Policy and adjust your display name to match it.

In particular, your display name must be a first and a last name separated by a space character, and must not be obviously fictitious.

JavaRanch Sheriff

[Asking smart questions] [About Bear] [Books by Bear]
subject: Flow being lost
jQuery in Action, 3rd edition