web.xml(8)_jsp-config
2014-04-22 13:56
302 查看
13.jsp-config
jsp-config元素主要用来设定JSP的相关配置,<jsp:config>包括<taglib>和<jsp-property-group>两个子元素.其中<taglib>元素
在JSP 1.2时就已经存在了;而<jsp-property-group>是JSP 2.0新增的元素.
taglib :对标记库描述符文件(Tag Libraryu Descriptor file)指定别名。此功能使你能够更改TLD文件的位置,而不用编辑使用这些文件的JSP页面。
<taglib>
taglib元素包含两个子元素taglib-uri和taglib-location.用来设定JSP网页用到的Tag Library路径.
<taglib-uri>URI</taglib-uri>
taglib-uri定义TLD文件的URI,JSP网页的taglib指令可以经由这个URI存取到TLD文件.
<taglib-location>/WEB-INF/lib/xxx.tld</taglib-laction>
TLD文件对应Web站台的存放位置.
</taglib>
<jsp-property-group>
jsp-property-group元素包含8个元素,分别为:
<description>Description</descrition>
此设定的说明
<display-name>Name</display-name>
此设定的名称
<url-pattern>URL</url-pattern>
设定值所影响的范围,如:/CH2 或者/*.jsp
<el-ignored>true|false</el-ignored>
若为true,表示不支持EL语法.
<scripting-invalid>true|false</scripting-invalid>
若为true表示不支持<%scription%>语法.
<page-encoding>encoding</page-encoding>
设定JSP网页的编码
<include-prelude>.jspf</include-prelude>
设置JSP网页的抬头,扩展名为.jspf
<include-coda>.jspf</include-coda>
设置JSP网页的结尾,扩展名为.jspf
</jsp-property-group>
</jsp-config>
范例:
<jsp-config>
<taglib>
<taglib-uri>Taglib</taglib-uri>
<taglib-location>/WEB-INF/tlds/MyTaglib.tld</taglib-location>
</taglib>
<jsp-property-group>
<description>
Special property group for JSP Configuration JSP example.
</description>
<display-name>JSPConfiguration</display-name>
<uri-pattern>/*</uri-pattern>
<el-ignored>true</el-ignored>
<page-encoding>GB2312</page-encoding>
<scripting-inivalid>true</scripting-inivalid>
............
</jsp-property-group>
</jsp-config>
jsp-config元素主要用来设定JSP的相关配置,<jsp:config>包括<taglib>和<jsp-property-group>两个子元素.其中<taglib>元素
在JSP 1.2时就已经存在了;而<jsp-property-group>是JSP 2.0新增的元素.
taglib :对标记库描述符文件(Tag Libraryu Descriptor file)指定别名。此功能使你能够更改TLD文件的位置,而不用编辑使用这些文件的JSP页面。
<taglib>
taglib元素包含两个子元素taglib-uri和taglib-location.用来设定JSP网页用到的Tag Library路径.
<taglib-uri>URI</taglib-uri>
taglib-uri定义TLD文件的URI,JSP网页的taglib指令可以经由这个URI存取到TLD文件.
<taglib-location>/WEB-INF/lib/xxx.tld</taglib-laction>
TLD文件对应Web站台的存放位置.
</taglib>
<jsp-property-group>
jsp-property-group元素包含8个元素,分别为:
<description>Description</descrition>
此设定的说明
<display-name>Name</display-name>
此设定的名称
<url-pattern>URL</url-pattern>
设定值所影响的范围,如:/CH2 或者/*.jsp
<el-ignored>true|false</el-ignored>
若为true,表示不支持EL语法.
<scripting-invalid>true|false</scripting-invalid>
若为true表示不支持<%scription%>语法.
<page-encoding>encoding</page-encoding>
设定JSP网页的编码
<include-prelude>.jspf</include-prelude>
设置JSP网页的抬头,扩展名为.jspf
<include-coda>.jspf</include-coda>
设置JSP网页的结尾,扩展名为.jspf
</jsp-property-group>
</jsp-config>
范例:
<jsp-config>
<taglib>
<taglib-uri>Taglib</taglib-uri>
<taglib-location>/WEB-INF/tlds/MyTaglib.tld</taglib-location>
</taglib>
<jsp-property-group>
<description>
Special property group for JSP Configuration JSP example.
</description>
<display-name>JSPConfiguration</display-name>
<uri-pattern>/*</uri-pattern>
<el-ignored>true</el-ignored>
<page-encoding>GB2312</page-encoding>
<scripting-inivalid>true</scripting-inivalid>
............
</jsp-property-group>
</jsp-config>
相关文章推荐
- Java web中的web-xml中标签定义之jsp-config
- web.xml文件中的jsp-config标签详解 --可用于解决jsp、html乱码问题
- web.xml之jsp-config
- web.xml中的jsp-config元素以及taglib元素
- web.xml中jsp-config标签
- JSP web.xml <jsp-config>标签使用详解
- web.xml中的jsp-config
- web.xml jsp config标签使用详解
- Java web中的web-xml中标签定义之jsp-config
- Web.xml中jsp-config元素简述
- web.xml(8)_jsp-config
- web.xml中的jsp-config元素以及由此想到的
- web.xml中配置JSP属性
- 使用ServletConfig获得web.xml资源中的参数
- web.xml中的contextConfigLocation在spring中的作用
- The absolute uri: http://java.sun.com/jsp/jstl/core cannot be resolved in either web.xml or the jar
- web.xml中contextConfigLocation的作用
- “java.sun.com/jsp/jstl/core cannot be resolved in either web.xml or the”错误
- web.xml AnnotationConfigWebApplicationContext
- 【已解决】This absolute uri http://java.sun.com/jsp/jstl/core cannot be resolved in either web.xml or th