According to TLD or attribute directive in tag file appears in jstl:jsp, attribute value does not accept any expressions__jsp

Source: Internet
Author: User
Tags tld
According to TLD or attribute directive in tag file appears in the JSP, attribute value does not accept any expressions

JSP exception occurs when application deployment runs, when using the JSTL library: according to TLD or attributes Directive in tag file, attribute value does not accept any expressions, perhaps because of the use of the JSP2.0 version, while not using an alternate version of the JSTL Core library (RT library), there are two ways to handle this:

1. Modify Web.xml. <web-app xmlns= "Http://java.sun.com/xml/ns/j2ee" xmlns:xsi= "Http://www.w3.org/2001/XMLSchema-instance" xsi: schemalocation= "Http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd" version= "2.4" >

To version 2.3 <! DOCTYPE Web-app Public "-//sun Microsystems, INC.//DTD Web Application 2.3//en" "Http://java.sun.com/dtd/web-app_2_3. DTD ">
<web-app>

2. Use Jstl Core RT Library

The JSTL Core Library has two taglib pseudo directives, in which the RT library relies on the JSP's traditional request-time attribute value, rather than relying on El to implement it (called the El Library. JSP2.0 will support EL)

JSP in the use of <%@ taglib uri=http://java.sun.com/jstl/core prefix= "C"%> in the 2.3 version can be, in 2.4 is not, is the version incompatible?

As long as the <%@ taglib uri= "Http://java.sun.com/jstl/core" prefix= "C"%>

Change to <%@ taglib uri=http://java.sun.com/jstl/core_rt prefix= "C"%>

There's no problem.

trackback:http://tb.blog.csdn.net/trackback.aspx?postid=994292

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.