JSP
脚本表达式:<%=java表达式%>
脚本片段<%若干java代码%>
jsp声明:<%!若干语句>jsp声明的内容会被复制粘贴到servlet的类的内部,成为类的成员
主要用来为翻译过来的servlet增加类的成员——包括成员属性 方法 静态成员静态代码块
例如:<%! int i = 0; %>
<%!
public void mx(){}
static{}
class Personx{}
{}
%>
jsp指令:基本语法:<%@ jsp 指令名称 属性=属性值%>
其中错误也可以在xml 配置《error-page》
《error-code>404《/error-code>
《location>/error/404.jsp《/location>
《/error-page>中配置:
include指令:<%@include file=""%>
taglib指令:<%@ taglib uri="" prefix=""%>
jsp九大隐士对象:
PageContext详解:
<%= pageContext.getAttribute(“country”, PageContext.SESSION_SCOPE) %>
<%–findAttribute自动搜寻属性 --%>
<%= pageContext.findAttribute(“country”) %>