The familiarity of the getParameter() method in getting data, especially form data, from a client HTML page to a JSP page is dealt with here. The request.getParameter() is being used here to retrieve form data from client side.
Steps to be followed
1) First, a html page exGetParameter.html accepts data from the client. The client enters text in the space provided and clicks on ‘Submit’.
2) Immediately the getparam.jsp page gets called, it being mentioned in the action tag.
3) This JSP page fetches the data using getParameter() method and displays the same to the user.
Note: Entire application has been developed and tested on NetBeans IDE 8.1.
Page to accept client data : exGetParameter.html page
Page to fetch client data : getparam.jsp
Client Data : exGetParameter.html
After clicking on ‘Submit’ the following screen appears.
Fetched Data from Client : getparam.jsp
- getAttribute() - Passing data from Server to JSP
- Establishing the two-way Communication between Server and Client in Java
- Java Implementation of Deffi-Hellman Algorithm between Client and Server
- Creating an Server-Client Application using the DatagramPacket and DatagramSocket classes
- Multi-threaded Chat Application in Java | Set 2 (Client Side Programming)
- Message Passing in Java
- Passing and Returning Objects in Java
- Parameter Passing Techniques in Java with Examples
- Data types in Java
- Parallel Data Processing in Java | Set 1
- Comparison of boolean data type in C++ and Java
- Data Conversion Using valueOf() method in Java
- Java Servlet and JDBC Example | Insert data in MySQL
- Parent and Child classes having same data member in Java
- Android | How to send data from one activity to second activity
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to email@example.com. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.