Java Certification, Programming, JavaBean and Object Oriented Reference Books
How to Pass Request Parameters

How to pass request parameters from one page to other page and how to use these parameters in next page?

You can pass parameters in the following way:

Suppose you want to pass username & password from the existing page to a page named  test.jsp then you can write:

   <%
       String nextp="test.jsp"+"?username="+usern"&password="+passw;

Now you can use the string variable nextp either as a hyperlink or in a submit button.

The variables usern & passw are String type variables containing username & password respectively.

To fetch these details from the test.jsp page just write:

   <%
     String username=request.getParameter("username");
     String password=request.getParameter("password");
   %>

Quick Links:
Do you have a Java Question?

Best Regards,
Java Programming Hints and Tips

All the site contents are Copyright © www.erpgreat.com and the content authors. All rights reserved.
All product names are trademarks of their respective companies.
The site www.erpgreat.com is not affiliated with or endorsed by any company listed at this site.
Every effort is made to ensure the content integrity.  Information used on this site is at your own risk.
 The content on this site may not be reproduced or redistributed without the express written permission of
www.erpgreat.com or the content authors.