java简单学习笔记20181205

tomcat的下载及安装方法。

jsp的介绍,及指令<%@page import file="xxxx" %>,<%@include file="xxx" %>,<%@ taglib uri='xxx" prefiex="c"%>

jsp的一些元素,使用实例<jsp:useBean />,跳转页面<jsp:forward />,设置实例属性值<jsp:getProperty />,取实例属性值<jsp:setProperty/>,载入部分页面<jsp:include page="xxx"/>

jsp内置对象,page,request,response,out,session,application,config,exception,pageContext,都具有通用的方法xx.getAttribute(key),xxx.setAttribute(key,value),xxx.removeAttribute(key)..,,

exception对象要在错误页中使用,jsp页面要指定错误页名称<%@ page errorPage="errorpage.jsp">,错误面要声明是错误页<%@ page isErrorPage="true" ,对象的方法常用的是exception.getMessage()

顺序级次:page 1=>request 2=>session 3=>application 4

猜你喜欢

转载自www.cnblogs.com/lofe/p/10074021.html