In JSP this absolute URI http://java.sun.com/jsp/jstl/core cannot be resolved ...... Solution

Source: Internet
Author: User
Tags tld

About org. Apache. Jasper. jasperexception in JSP:

This absolute URIHttp://java.sun.com/jsp/jstl/core) Cannot be resolved in either web. xml or the jar files deployed with this application

According to "proficient in JSP-web development technology and typical applications", I typed a piece of jstl code. I did not expect an error. It took me an afternoon to sit down and hurt my ass ......

My development environments are eclipse 3.2.0, myeclipse 5.0, Tomcat 5.0.28 (which uses jre1.4), and jdk1.5

I searched the internet for the same statement: the jstl version (1.0 and 1.1) is inconsistent. There is also check the virtual directory under the WEB-INF directory lib folder (if there is a lib folder, then create a dynamic) whether there is jstl. jar and standard. jar two jar packages. If not, copy them to Lib.

All tried, but the error is still ...... Later, I found my own mess. After the above change, there are two solutions:

The first is to import jstl1.1 in Eclipse project, download the jstl1.1 http://jakarta.apache.org/taglibs/index.html
Then decompress and put *. jar and *. TLD under the/WEB-INF/lib directory. That isIn all the jakarta-taglibs-standard-current.zip (jstl class libraries. jar and. TLB put in the Lib folder under the WEB-INF directory, JSP File Import <% @ taglib prefix = "C" uri = "/WEB-INF/lib/C. TLD "%>,The test is acceptable.

The second is to modify web. xml and add the following statement:

<JSP-config>

<Taglib>

<Taglib-Uri> http://java.sun.com/jsp/jstl/core </taglib-Uri>

<Taglib-location>/WEB-INF/C. TLD </taglib-location>

</Taglib>

<Taglib>

<Taglib-Uri> http://java.sun.com/jsp/jstl/xml </taglib-Uri>

<Taglib-location>/WEB-INF/X. TLD </taglib-location>

</Taglib>

<Taglib>

<Taglib-Uri> http://java.sun.com/jsp/jstl/fmt </taglib-Uri>

<Taglib-location>/WEB-INF/FMT. TLD </taglib-location>

</Taglib>

<Taglib>

<Taglib-Uri> http://java.sun.com/jsp/jstl/ SQL </taglib-Uri>

<Taglib-location>/WEB-INF/SQL. TLD </taglib-location>

</Taglib>

</JSP-config>

Import in JSP<% @ Taglib prefix = "C" uri ="Http://java.sun.com/jsp/jstl/core"%>.It should be okay ......

The second type is recommended. ^_^!

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.