Questions about using the JSTL tag library in IntelliJ idea

Source: Internet
Author: User

Today, when using idea as a JSP project, we first find the DTD error introduced in the JSP page, and idea does not recognize the DTD. While Tomcat is running normally, click on the page to jump to the DTD page with Jstl error, check the browser, found the following problems:

org.apache.jasper.JasperException: This absolute URI Http://java.sun.com/jsp/jstl/core ) cannot be resolved in either web. xml or the jar files deployed with this application

There are three problems with the exception.

One: Jstl version issue

Jstl1.0 's DTD notation is: <%@ taglib prefix= "C" uri= "Http://java.sun.com/jstl/core"%>

jstl1.1 after the wording is: <%@ taglib prefix= "C" Uri=http://java.sun.com/jsp/jstl/core%>

Troubleshooting: I'm using a 1.1.2 version of the jar, and the DTD referenced in the project is the 1.1.2 DTD.

  

Second: The problem of Jstl jar

There is a jar under Lib in the classes file, but there is no jar package under Web_inf lib.

Troubleshooting: Classes has jar packages under LIB, but not Wen-inf under Lib folder.

Workaround: Download the DTD file for the JSTL tag library
: http://archive.apache.org/dist/jakarta/taglibs/standard/binaries/
Pull to the bottom, find the latest one is "Jakarta-taglibs-standard-1.1.2.zip", it is not the following ASC file download
Or a direct point: http://archive.apache.org/dist/jakarta/taglibs/standard/binaries/jakarta-taglibs-standard-1.1.2.zip

Three: The discovery of the jar will still be an error (the problem of the low version of the IDE)

But idea still makes an error, because it doesn't recognize the tag, so it needs to be added in the settings.
Select File->setting to find Languages&frameworks-->schemas and DTDs under setting, click + under the external Schemas and DTDs box on the right, Then fill in the URI with the C.tld file in the TLD directory where http://java.sun.com/jsp/jstl/core found the extracted files in the Explorer, and select, here you can end the question of idea not recognizing Jstl

Troubleshooting: I'm using the latest idea, so I don't have this problem. It is available directly after ingestion, although the URI of the corresponding schemas tag is not found in setting, but is still available. Do not know why, if you know the big guy, welcome message to tell, greatly appreciated.

  

From:https://www.cnblogs.com/junhuawang/p/6953177.html,https://www.cnblogs.com/dangzhenjiuhao/p/5791620.html

  

Questions about using the JSTL tag library in IntelliJ idea

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.