• JSP、JSTL、EF学习笔记


    JSP
    1)Java Server Page,在html中嵌入java代码
    2)九个内置(隐式)对象
    	request
    	response
    	out
    	page
    	pageContext
    	config
    	session
    	application
    	Exception
    3)JSP指令
    	<%@ page ... %>		Page指令,定义页面属性
    		eg:<%@ page language="java" contentType="text/html;charset=UTF-8" pageEncoding="UTF-8"%>
    	<%@ include ... %>	包含其他文件
    		eg:<%@ include file="../common/comm.jsp"%>
    	<%@ taglib ... %>	引入标签库的定义
    		eg:<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
    
    JSTL
    1)JSP Standard Tag Libaray
    	http://www.runoob.com/jsp/jsp-jstl.html
    2)四类标签
    	核心(core)标签
    	格式化(format)标签
    	SQL标签
    	XML标签
    3)标签的使用(以核心标签为例)
    	a.在web.xml中配置
    		<jsp-config>
    			<taglib>
    				<taglib-uri>http://java.sun.com/jstl/core</taglib-uri>
    				<taglib-location>/WEB-INF/taglib/c.tld</taglib-location>
    			</taglib>
    		</jsp-config>
    	b.在jsp页面中添加
    		<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
    4)核心标签
    	<c:out ></c:out>
    	<c:set var="" value="" scope=""/>
    		scope可选,默认为page
    	<c:remove var="" scope=""/>
    		同set
    	<c:url value="/index.jsp"/>
    		会自动在value前添加项目名,即project_name/index.jsp,亦等同于${pageContext.request.contextPath}/inedx.jsp的效果
    	<c:if test="${condition}" val="" scope="">
    		do something...
    	</c:if>
    	<c:choose>
    		<c:when test="${condition}">
    			do something...
    		</d:when>
    		<c:when test="${condition}">
    			do something...
    		</d:when>
    		<c:when test="${condition}">
    			do something...
    		</d:when>
    		<c:otherwise>
    			do something...
    		</d:otherwise>
    	</c:choose>
    	<c:forEach var="" items="">
    		do something...
    	</c:forEach>
    		items为传入的集合,val是每一项
    
    EL
    1)Expression Language
    	http://www.runoob.com/jsp/jsp-expression-language.html
    2)十一个内置(隐式)对象
    	pageScope
    	requestScope
    	sessionScope
    	applicationScope
    	param
    	paramValues
    	header
    	headerValues
    	initParam
    	cookie
    	pageContext
    
  • 相关阅读:
    创建自动执行存储过程
    创建链接服务器
    SQLServer查询特殊符号处理
    SQL Server维护计划自动备份数据库
    SQL Server收缩数据库&列出所有表的数据条数
    SQL server日志文件过大处理方式
    SQL Server批量删除数据库表
    done apple经理面 匹配括号但是不能用stack
    done Beaconfire中国小哥中规中矩screening
    done marlabs挺难的screening
  • 原文地址:https://www.cnblogs.com/stonesingsong/p/7226156.html
Copyright © 2020-2023  润新知