logo

JSP Request Implicit Objects


Show

The JSP request is an implicit object of type HttpServletRequest that is generated for each and every jsp request by the web container. It can be made in use to request information for example parameter, header information, remote address, server name, server port, content type, character encoding, etc.

It can also be made in use to set, get and detach features from the jsp request reach.

Request implicit object and in that, we are showing the identity of the user with a welcome message. Below is the example is given for this simple method.

Example of JSP request implicit objects

index.html
<form action="welcome.jsp">  
<input type="text" name="uname">  
<input type="submit" value="go"><br/>  
</form> 

welcome.jsp

<%   
String name=request.getParameter("uname");  
out.print("welcome "+name);  
%>

Output