81,077
社区成员




<html>
<head>
<base href="<%=basePath%>">
<title>My JSP '2.jsp' starting page</title>
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<!--
<link rel="stylesheet" type="text/css" href="styles.css">
-->
</head>
<%
request.setAttribute("attributeText", "attributeText");
%>
<body>
<%=request %>
<form action="CheckRequest?urlText=urlText" method="post">
<input type="text" name="formText" value="formText">
<input type="submit" value="提交">
</form>
</body>
</html>
System.out.println(request);
System.out.println(request.getParameter("urlText"));
System.out.println(request.getParameter("formText"));
System.out.println(request.getAttribute("attributeText"));
request在这里相当一个作用域,没有起到实质的作用,本身没有从request中取到值,一般情况下,都是用getAttribute("attributeText"); 并且都是有范围属性规定的。。