JSP request Object

JSP request Object

JSP request implicit object is instance of javax.servlet.http.HttpServletRequest . it’s one of the argument of JSP service method. jsp request  object is created by the web container We can use request object to get the request parameters, cookies, request attributes, session, header information e.t.c.

Example of JSP request implicit object

index.html


<html>
<body>
<form action="first.jsp">
<input type="text" name="name">
<input type="submit" value="Click"><br/>
</form>
</body>
</html>
 Screenshot (25)

first.jsp


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

One thought on “JSP request Object

Leave a comment