jsp代码实例第342课

阅读 174

2022-02-24

code342.jsp

<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
</head>
<body>
<%-- jsp forward 与内置对象的使用 --%>
<%
	request.setAttribute("name", "tom");
	request.setAttribute("age", "30");
	request.setAttribute("sex", "男");
%>
<%-- 使用jsp forward跳转为服务器跳转,地址栏的链接地址不发生变化 --%>
<jsp:forward page="code343.jsp"></jsp:forward>
</body>
</html>

精彩评论(0)

0 0 举报