Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Form Submission and Reading parameter

 
Nilesh Nadiyana
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,
I have a login jsp page, inside which I have two text fields, Login and Password and a button for submit. This is pretty simple and working.
On choose of Submit, I want to open a new JSP page (no servlet) (because of specific requirements that on choose of login button a new page should be opened and the current page would remain as is) which should be able to read the values entered inside that form.
Is there someway, I can read those entered values here ?
one way is to submit the form and setting its action to the same jsp page, but that wont/doesnt work.
Or, Is there a possibility that I can simply read those values , say using javascript but then how to pass them onto the next JSP page?
Or, Effectively what I want to do is pass the values of the form in JSP1 to a new JSP page JSP2 and read those from there (without "get" method).
TIA.
Regards,
Nilesh.
[ November 05, 2003: Message edited by: Nilesh Nadiyana ]
[ November 05, 2003: Message edited by: Nilesh Nadiyana ]
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65229
95
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
(no servlet) (because of specific requirements that on choose of login button a new page should be opened and the current page would remain as is)

I don't see how that requirement prevents you from using a servlet to process your login data.
bear
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65229
95
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Let me see if I get this right: you have a browser window loaded with a page containing a login form. Upon submission of the form, the current window remains at the login form and a new window opens.
Is this correct?
If so, your solution is easy. Simply place the following attribute on your form:

This will cause the form to be submitted to a newly opened browser window. The processing you do in your servlet (preferred) or JSP is competely transparent as to which window you are operating within.
bear
 
Nilesh Nadiyana
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, This did the trick for me, Thanks a lot.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic