Can not find the tag library descriptor for “http://java.sun.com/jsp/jstl/core” [duplicate]

Can not find the tag library descriptor for “http://java.sun.com/jsp/jstl/core” Based on one of your previous questions you’re using Tomcat 7. In that case you need JSTL 1.2. However, you’ve there a jstl.jar file while JSTL 1.2 has clearly the version number included like so jstl-1.2.jar. The sole filename jstl.jar is typical for JSTL 1.0 and … Read more

Sun JSTL taglib declaration fails with “Can not find the tag library descriptor” [duplicate]

To resolve this issue: The jstl jar should be in your classpath. If you are using maven, add a dependency to jstl in your pom.xml using the snippet provided here. If you are not using maven, download the jstl jar from here and deploy it into your WEB-INF/lib. Make sure you have the following taglib … Read more

jstl foreach omit an element in last record

Just use LoopTagStatus#isLast(). <c:forEach items=”${fileList}” var=”current” varStatus=”loop”> { id: 1001, data: [ “<c:out value=”${current.fileName}” />”, “<c:out value=”${current.path}” />”, “<c:out value=”${current.size}” />”, “<c:out value=”${current.type}” />” ] }<c:if test=”${!loop.last}”>,</c:if> </c:forEach> You can also use the conditional operator in EL instead of <c:if>: ${!loop.last ? ‘,’ : ”}

EL access a map value by Integer key

Initial answer (EL 2.1, May 2009) As mentioned in this java forum thread: Basically autoboxing puts an Integer object into the Map. ie: map.put(new Integer(0), “myValue”) EL (Expressions Languages) evaluates 0 as a Long and thus goes looking for a Long as the key in the map. ie it evaluates: map.get(new Long(0)) As a Long … Read more

Evaluate list.contains string in JSTL

there is no built-in feature to check that – what you would do is write your own tld function which takes a list and an item, and calls the list’s contains() method. e.g. //in your own WEB-INF/custom-functions.tld file add this <?xml version=”1.0″ encoding=”ISO-8859-1″ ?> <!DOCTYPE taglib PUBLIC “-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.2//EN” “http://java.sun.com/dtd/web-jsptaglibrary_1_2.dtd”> … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)