aspose file tools*
The moose likes JSP and the fly likes Form Submission and Reading parameter Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "Form Submission and Reading parameter" Watch "Form Submission and Reading parameter" New topic
Author

Form Submission and Reading parameter

Nilesh Nadiyana
Greenhorn

Joined: Dec 24, 2002
Posts: 21
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

Joined: Jan 10, 2002
Posts: 61209
    
  66

(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


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61209
    
  66

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

Joined: Dec 24, 2002
Posts: 21
Yes, This did the trick for me, Thanks a lot.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Form Submission and Reading parameter