wood burning stoves 2.0*
The moose likes JSP and the fly likes Forms in Jsp Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "Forms in Jsp" Watch "Forms in Jsp" New topic
Author

Forms in Jsp

Ramya reenu
Greenhorn

Joined: Nov 28, 2005
Posts: 13
Hi All,

I am using 2 forms in a Jsp page.

In First form I am listing system drive in one list box and on selecting the dirve i am displaying respective files or folders in another listbox.For this action i am not using post method in the first form.

In the second form i getting some values from the user and submitting the form for this i am using post method.

on submitting this page i should pass values to another jsp page from both forms.

When i enter values in the first form the values in second form gives null value.Can i retain the value of the first form when i am using second form.
can someone help me.

Thanks in advance.

Ramya
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60806
    
  65

"Ramya",

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.

Thanks!
bear
JavaRanch Sheriff


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Christophe Verré
Sheriff

Joined: Nov 24, 2005
Posts: 14687
    
  16

Is there any particular reason why you have separated the forms ?


[My Blog]
All roads lead to JavaRanch
Ramya reenu
Greenhorn

Joined: Nov 28, 2005
Posts: 13
yes.

i am using two forms because for the first function i cannot use post menthod.but for the secon function i should use post method.

that is y? i have two forms.

Is it advisable to use two forms in a jsp page?

Ramya
Christophe Verré
Sheriff

Joined: Nov 24, 2005
Posts: 14687
    
  16

You could call a Javascript function which would be called when you click the submit button of the second form. This javascript function could set the first form values into the second form hidden tags.
That's pretty ugly though
 
Don't get me started about those stupid light bulbs.
 
subject: Forms in Jsp
 
Similar Threads
page transition in JSP-logic needed
JSP Form values Not able to submit
No blank screen
Refreshing a particular form
Refreshing a particular form