jsp的九种对象我简述之:
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("你的用户号还没有开通!!");
else if(errmsg != null && errmsg.equals("error2"))
out.print("您输入管理员帐号或者密码不正确!!");
%>
下面是request对象在java doc中的说明:其他类似
新闻热点
疑难解答