Detailed description of the JSP-config tag in the web. xml file-can be used to solve JSP and HTML garbled issues

Source: Internet
Author: User

WEB-INF/Web, XML, JSP-config label learning:

<JSP-config> includes two sub-elements: <taglib> and <JSP-property-group>.

 
The <taglib> element already exists in JSP 1.2, and <JSP-property-group> is a new element in JSP 2.0.
 
The <JSP-property-group> elements mainly have eight child elements:
1. <description>: Set description;
2. <display-Name>: Set the name;
3. <URL-pattern>: Set the range affected by the value, for example,/CH2 or/*. jsp;
4. <El-ignored>: if it is true, El syntax is not supported;
5. <Scripting-invalid>: if it is true, the <% scripting %> syntax is not supported;
6. <page-encoding>: sets the JSP page encoding;
7. <include-prelude>: Set the JSP page header with the extension. jspf;
8. <include-coda>: set the end of the JSP page with the extension. jspf.
 
Complete configuration of a simple <JSP-config> element:
<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>
<URL-pattern>/JSP/* </url-pattern>
<El-ignored> true </El-ignored>
<Page-encoding> UTF-8 </page-encoding>
<Scripting-invalid> true </Scripting-invalid>
<Include-prelude>/include/Prelude. jspf </include-prelude>
<Include-coda>/include/coda. jspf </include-coda>
</JSP-property-group>
</JSP-config>
 
Bytes --------------------------------------------------------------------------------------------------
 
The following is the configuration of the JSP-config file on my local machine, which is used to solve the HTML page garbled problem:
<JSP-config>
<JSP-property-group>
<Description> HTML encoding </description>
<Display-Name> HTML encoding config </display-Name>
<URL-pattern> *. html </url-pattern>
<El-ignored> false </El-ignored>
<Page-encoding> UTF-8 </page-encoding>
<Scripting-invalid> true </Scripting-invalid>
</JSP-property-group>
</JSP-config>

Related Article

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.