The Request property scope indicates that after the server jumps, the contents of all settings are still preserved. (Server-side jump: page jump, the address bar does not change)
Below is a small example to test under:
(1) request_demo.jsp
1<%@ page contenttype= "text/html; Charset=utf-8 "language=" java "errorpage=" "%>2<%@ pageImport= "Java.util.*"%>3<!doctype html>456<meta charset= "Utf-8" >7<title>page Attribute Range </title>89 Ten<body> One<% ARequest.setattribute ("name", "Ninic"); -Request.setattribute ("Birthday",NewDate ()); -%> the<jsp:forward page= "request_demo2.jsp"/> -</body> -
(2) request_demo2.jsp
1<%@ page contenttype= "text/html; Charset=utf-8 "Language=" Java "Import= "java.util.*" errorpage= ""%>2<!doctype html>345<meta charset= "Utf-8" >6<title> Untitled Document </title>78 9<body>Ten<% OneString Username= (String) request.getattribute ("name"); ADate userbirthday= (date) request.getattribute ("Birthday"); -%> - the -</body> -
Displayed in the browser:
JSP_ Attribute Range _request