码迷,mamicode.com
首页 > Web开发 > 详细

jsp跳转标签<jsp:forward>

时间:2017-02-21 01:04:06      阅读:152      评论:0      收藏:0      [点我收藏+]

标签:body   html   lang   forward   页面   UI   lan   tty   public   

forward.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>
<jsp:forward page="target.jsp">
<jsp:param value="1234" name="userName"/>
<jsp:param value="123456" name="password"/>
</jsp:forward>
</body>
</html>

target.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>
服务器内部跳转后的页面<br/>
userName:<%=request.getParameter("userName") %><br/>
password:<%=request.getParameter("password") %><br/>
</body>
</html>

jsp跳转标签<jsp:forward>

标签:body   html   lang   forward   页面   UI   lan   tty   public   

原文地址:http://www.cnblogs.com/csy666/p/6422032.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!