Web.xml Learning (8) _jsp-config

Source: Internet
Author: User
Tags config include tld

13.jsp-config

The Jsp-config element is primarily used to set the related configuration of the JSP,<jsp:config> including <taglib> and <jsp-property-group> two child elements. of which <taglib> Elements

It already exists at JSP 1.2, and <jsp-property-group> is the new element of JSP 2.0.

Taglib: assigns aliases to tag library descriptor files (tag Libraryu descriptor file). This feature allows you to change the location of the TLD file without editing the JSP page that uses the files.

<taglib>

The Taglib element contains two child elements Taglib-uri and taglib-location. Used to set the tag library path used for JSP pages.

<taglib-uri>URI</taglib-uri>

The taglib instruction for a uri,jsp Web page that defines a TLD file can be accessed via this URI to the TLD file (Taglib-uri).

<taglib-location>/WEB-INF/lib/xxx.tld</taglib-laction>

The TLD file corresponds to the location where the Web site is stored.

</taglib>

<jsp-property-group>

The Jsp-property-group element contains 8 elements, respectively:

<description>Description</descrition>

Description of this setting

<display-name>Name</display-name>

The name of this setting

<url-pattern>URL</url-pattern>

The range, such as:/CH2 or/*.jsp, that is affected by the setting value.

<el-ignored>true|false</el-ignored>

If true, indicates that El syntax is not supported.

<scripting-invalid>true|false</scripting-invalid>

True indicates that <%scription%> syntax is not supported.

<page-encoding>encoding</page-encoding>

Set the code for the JSP page

<include-prelude>.jspf</include-prelude>

Sets the head of the JSP page, with the extension. JSPF

<include-coda>.jspf</include-coda>

Sets the end of the JSP page with the extension. JSPF

</jsp-property-group>

</jsp-config>

Example:

<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>

More Wonderful content: http://www.bianceng.cnhttp://www.bianceng.cn/webkf/aspx/

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.