JSP get Parameter

JSP get Parameter is used to return the value of a request parameter passed as query string and posted data which is encoded in the body of request.

JSP get Parameter

JSP get Parameter is used to return the value of a request parameter passed
as query string and posted data which is encoded in the body of request.

Syntax JSP get Parameter:

<%= request.getParameter("name") %>

Understand with Example

In this section, you will learn how to get the parameters using the method request.getParameter().
This method is provided by the interface ServletRequest which returns the
value of a request parameter as a String, or null if
the parameter does not exist. You can see in the given example that we prompt
the user to enter the name and address in the provided text fields. Then on
clicking the button, the method request.getParameter() retrieves the
passed parameters and displays the value of the parameters on the browser.