1.page指令
<%@page contentType="text/html ;charset=utf-8" pageEncoding="GBK"%>
在jsp中如果pageEncoding属性存在,那么jsp页面的编码方式由pageEncoding来决定,如果没有则由contentType属性的charset决定,如果charset也不存在,则用默认的iso-8859-1来决定。
2.include指令
动态包含 <%@ include page="" %/>
<%@ include file="" %/>
====================================================================
3.forward指令
跳转:
页面forward_demo01.jsp
<body>
<%String username="liuhui";%>
<jsp:forward page="forward_demo02.jsp">
<jsp:param name="username" value="<%=username%>"/>
<jsp:param name="zhandian"value="www.google.com"/>
</jsp:forward>
</body>
</html>
页面forward_demo02.jsp
<html>
<head>这是跳转之后的页面</head>
<body>
参数1:<%=request.getParameter("username")%>
参数2:<%=request.getParameter("zhandian")%>
</body>
</html>
这个页面接收页面forward_demo01.jsp传递过来的参数username 和zhandian。