Where to put jstl.jar and standard.jar so that Netbeans does not give errors / warnings?

Where I put jstl.jarand standard.jarso that Netbeans no longer gives taglib errors / warnings.

+3
source share
1 answer

As for each "third-party library" that you would like to use in your webapp, just put them in the folder of /WEB-INF/libyour web project. This way it will be automatically accepted in the classpath / buildpath.

You only need to make sure that you have not extracted the JAR file and placed its free content in the class path, and / or hard-coded taglib in your own web application web.xml. Some bad online lessons, such as roseindia (cough), offer just that. Do not do that. It will be even worse.

Then, in your JSP files, make sure you use the correct taglib URI, as described in the JSTL TLD documentation . For example, JSTL core should be specified as follows:

<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>

/jsp. JSTL 1.1. JSTL 1.0 /jsp. JSTL 1.1/1.2, . , _rt, /core_rt, .

, jstl-1.2.jar standard.jar . , jstl JAR, , JAR (, /WEB-INF/lib, ).

+7

All Articles