aspose file tools*
The moose likes JSP and the fly likes Some problem passing values Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "Some problem passing values" Watch "Some problem passing values" New topic
Author

Some problem passing values

Varun Nambuthiri
Ranch Hand

Joined: Sep 20, 2010
Posts: 76
Hi everybody ,

I am having certain problems with passing values between some pages .
So here's the deal ..

I have a main page where i display some list of clients and I have assigned Id's of each the client to a radio button .Now I have to get the value of the selected radio button from the main page to another page which is accessed through the menu ..

Now is it possible to use getParameter() here ..? If not then how ??

Please help me ..

Thank You in advance
Harpreet Singh janda
Ranch Hand

Joined: Jan 14, 2010
Posts: 317

Are you submitting the main page to another jsp?
Abimaran Kugathasan
Ranch Hand

Joined: Nov 04, 2009
Posts: 2066

Can you show your main page?


|BSc in Electronic Eng| |SCJP 6.0 91%| |SCWCD 5 92%|
Varun Nambuthiri
Ranch Hand

Joined: Sep 20, 2010
Posts: 76


This is the code now i have a menu in this page which is imported ... so ....
Pradeep Prabhakaran
Greenhorn

Joined: Sep 25, 2010
Posts: 7
First of all, you cant use request.getParameter() ,if you have the page imported in jsp( which contains the menu, as you say).

if you want to use request.getParameter(),
then you ve to append the object that you are passing to the url.
e.g
Alternative-1
Main. jsp




nextpage.jsp


Alternative-2
main.jsp


nextpage.jsp
get the param using request.getParameter()
as mentioned in the above alternative.



The above two alternatives will work. The first alternative can be used anywhere, provided you suffix the
parameter name and its value to the url.

Remember,just because, you have a page imported in your jsp you cannot use "request.getParamter()"
to get the values from the imported page.
Varun Nambuthiri
Ranch Hand

Joined: Sep 20, 2010
Posts: 76
Thanks for the reply and some nice advice

I had to make certain changes at the last changes instead of menu I gave a button in that main page and so i could use those values ..

Thanks anyway
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Some problem passing values
 
Similar Threads
Struts with javascript
jsp not reloaded in frame
passing hidden values
struts 2 validation problem
java script remove element by id