zoukankan      html  css  js  c++  java
  • jsp config设置jsp页面

    jsp-config

    jsp-config功能:用于设定jsp页面的相关设置(web.xml 版本在2.4之后)
    常用的设置包括 taglib和jsp-property-group两个子元素。其中taglib元素在jsp1.2就存在
    <jsp-config>
      <taglib>
         <taglib-uri>xx</taglib-uri>
         <taglib-location>xx</taglib-location>
      </taglib>
      
      <jsp-property-group>
         <description>xx</description>
         .
         .
         .
      </jsp-property-group>
    </jsp-config>
    

    taglib

     web-app 2.4版本以后 taglib需要放置在jsp-config中。在版本2.4之前可以直接放置在 
    <taglib>
    ​
      <taglib-uri> 标签库唯一访问标识(必须与标签库tld描述文件中的uri一致)</taglib-uri>
      <taglib-location>标签库tld描述文件本地路径(如:/WEB-INF/mytag.tld)</taglib-location>
    ​
    </taglib>
    
    使用JSTL时需要引入的jstl的taglib
     <taglib>
        <taglib-uri>http://java.sun.com/jstl/fmt</taglib-uri>
        <taglib-location>/WEB-INF/fmt.tld</taglib-location>
      </taglib>
    ​
      <taglib>
        <taglib-uri>http://java.sun.com/jstl/core</taglib-uri>
        <taglib-location>/WEB-INF/c.tld</taglib-location>
      </taglib>
    ​
      <taglib>
        <taglib-uri>http://java.sun.com/jstl/fn</taglib-uri>
        <taglib-location>/WEB-INF/fn.tld</taglib-location>
      </taglib>
    ​
      <taglib>
        <taglib-uri>http://java.sun.com/jstl/perTag</taglib-uri>
        <taglib-location>/WEB-INF/permittedTaglibs.tld</taglib-location>
      </taglib>
    ​
      <taglib>
        <taglib-uri>http://java.sun.com/jstl/sql</taglib-uri>
        <taglib-location>/WEB-INF/sql.tld</taglib-location>
      </taglib>
    ​
        <taglib>
        <taglib-uri>http://java.sun.com/jstl/script</taglib-uri>
        <taglib-location>/WEB-INF/scriptfree.tld</taglib-location>
      </taglib>
    ​
      <taglib>
        <taglib-uri>http://java.sun.com/jstl/x</taglib-uri>
        <taglib-location>/WEB-INF/x.tld</taglib-location>
      </taglib>
    

    jsp-property-group

    该子元素是jsp2.0新增的元素。由八个子元素构成
    description    设定说明
    display-name	设定名称
    url-pattern	设定值所影响的范围,如CH2 或者/*.jsp
    el-ignored	若为true,表示不支持EL语句
    scripting-invalid	若为true,表示不支持<%scription%>语法
    page-encoding	设定JSP网页的编码
    include-prelude	设置JSP网页的抬头,扩展名为.jspf
    inclde-code	设置JSP网页的结尾,扩展名为.jspf
    
  • 相关阅读:
    P3746 [六省联考2017]组合数问题 矩阵乘法
    P3322 [SDOI2015]排序 暴搜
    P2877 [USACO07JAN]Cow School G 斜率优化+分数规划
    P3283 [SCOI2013]火柴棍数字 DP
    AT2005 [AGC003E] Sequential operations on Sequence 单调栈+二分+差分
    CF568C New Language 2-SAT
    P4410 [HNOI2009]无归岛 仙人掌图
    CF505D Mr. Kitayuta's Technology 并查集 拓扑排序
    Algorithms: Design and Analysis, Part 1
    双目测距项目
  • 原文地址:https://www.cnblogs.com/ssgao/p/8866599.html
Copyright © 2011-2022 走看看