A.jsp
<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <title>Insert title here</title> </head> <body> <% String name="sdffsdf"; %> <a href="NewFileB.jsp?name=<%=name%>">传递到B页面</a> </body> </html>
B.jsp
<%@ page language="java" contentType="text/html; charset=utf-8"
pageEncoding="utf-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Insert title here</title>
</head>
<body>
<%
String name=request.getParameter("idd");
out.println("接收到:"+name);
%>
</body>
</html>本文出自 “帆布鞋也能走猫步” 博客,请务必保留此出处http://9409270.blog.51cto.com/9399270/1753248
原文:http://9409270.blog.51cto.com/9399270/1753248