This week's book giveaways are in the Refactoring and Agile forums.
We're giving away four copies each of Re-engineering Legacy Software and Docker in Action and have the authors on-line!
See this thread and this one for details.
Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Forms in Jsp

 
Ramya reenu
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 64631
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"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
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is there any particular reason why you have separated the forms ?
 
Ramya reenu
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic