0
点赞
收藏
分享

微信扫一扫

jsp代码实例第302课


code302.jsp

<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
</head>
<body>
<c:out value="用jstl标签输出字符串"></c:out>
<br>
<c:set var="scopeVar1" value="为变量赋值" scope="request"></c:set>
scopeVar1 = <c:out value="${scopeVar1}" escapeXml="true"></c:out>
<br>
<c:set var="scopeVar2" scope="session">
hello ${param.name}
</c:set>
scopeVar2 = <c:out value="${scopeVar2}"></c:out>
</body>
</html>


举报

相关推荐

0 条评论