I will briefly describe nine types of Jsp objects:
Page
Application
Request
Response
Session
Config
Out
PageContext
Page
<% @ Page contentType = "text/html; charset = gb2312" language = "java" import = "java. SQL. *" %>
Response
<%
Response. setHeader ("Pragma", "No-cache ");
Response. setHeader ("Cache-Control", "no-cache ");
Response. setDateHeader ("Expires", 0 );
%>
<% Response. sendRedirect ("login. jsp"); %>
Session
<% Session. invalidate (); %>
Request/session
<%
String errmsg = request. getParameter ("errmsg ");
Request. getSession (true );
String chk = "false ";
Session. putValue ("Enter", chk );
%>
Out
<%
If (errmsg! = Null & errmsg. equals ("error1 "))
Out. print ("your user number has not been activated !! ");
Else if (errmsg! = Null & errmsg. equals ("error2 "))
Out. print ("the Administrator account or password you entered is incorrect !! ");
%>
The description of the request object in Java doc is as follows: