aspose file tools*
The moose likes JSP and the fly likes Stuck on EL syntax for request values on child page Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "Stuck on EL syntax for request values on child page" Watch "Stuck on EL syntax for request values on child page" New topic
Author

Stuck on EL syntax for request values on child page

Melinda Savoy
Ranch Hand

Joined: Jun 21, 2005
Posts: 387

I have a parent JSP page that I am trying to pass specific values to hidden fields via a js function to a child page. I am thinking I have the syntax incorrect because the child page shows in the viewSource option off the browser only a "" value and not what I am trying to pass in. When I do a viewSource on the parent page it shows the values just fine.

Any help or direction would be greatly appreciated.

Here is my JS function in the parent page:



Here is my child JSP page:


[ April 23, 2007: Message edited by: Bear Bibeault ]
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61656
    
  67

In the following:



what is request?

I do not see where you set up anything to define a scoped variable named "request".


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Melinda Savoy
Ranch Hand

Joined: Jun 21, 2005
Posts: 387

Bear,

You are correct. There is no variable defined for scope. I thought that is what I would use to acquire the values from the parent page where the js code sat.

Therefore the reason for my question. How do I get the values from the parameters set in the url when I go to the child page?

Thanks.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61656
    
  67

The syntax for getting request parameters, no matter how they are set, is:



You do have a copy of the JSP Spec handy, right?
Melinda Savoy
Ranch Hand

Joined: Jun 21, 2005
Posts: 387

Bear,

Thanks so much for your help. This is my first solo JSP.

It's appreciated.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61656
    
  67

My pleasure. But really, grab yourself a copy of the JSP Spec -- if for nothing else than as a reference to the EL. Otherwise, you're flying blind.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Stuck on EL syntax for request values on child page