Creating Array using JSTL or EL

If you’re already on EL 3.0 (Tomcat 8+, WildFly 8+, GlassFish 4+, Payara 4+, TomEE 7+, etc), which supports new operations on collection objects, you can use ${[…]} syntax to construct a list, and ${{…}} syntax to construct a set. <c:set var=”alphabet” value=”${[‘A’,’B’,’C’,’D’,’E’,’F’,’G’,’H’,’I’,’J’,’K’,’L’,’M’,’N’,’O’,’P’,’Q’,’R’,’S’,’T’,’U’,’V’,’W’,’X’,’Y’,’Z’]}” scope=”application” /> If you’re not on EL 3.0 yet, use the ${fn:split()} … Read more

java.lang.ClassNotFoundException: org.apache.jsp.index_jsp

It’s been a while since I posted this, but I thought I would show how I figured it out (as best as I recall now). I did a Maven dependency tree to find dependency conflicts, and I removed all conflicts with exclusions in dependencies, e.g.: <dependency> <groupId>commons-logging</groupId> <artifactId>commons-logging-api</artifactId> <version>1.1</version> <exclusions> <exclusion> <groupId>javax.servlet</groupId> <artifactId>servlet-api</artifactId> </exclusion> </exclusions> … Read more

By default, where does Spring Boot expect views to be stored?

The Solution I found the answer via trial-and-error, which turned out rather annoying. I hope someone can correct me if this conclusion is wrong, but it appears that Spring Boot does not like the string WEB-INF. I renamed the WEB-INF directory to view and changed the application.properties to the following and the view loaded successfully. … Read more

How to install JSTL? It fails with “The absolute uri cannot be resolved” or “Unable to find taglib” or NoClassDefFoundError or ClassCastException

In your specific case, org.apache.jasper.JasperException: The absolute uri: http://java.sun.com/jstl/core cannot be resolved in either web.xml or the jar files deployed with this application that URI is for JSTL 1.0, but you’re actually using JSTL 1.2 which uses URIs with an additional /jsp path. This URI change is because JSTL, who invented EL expressions, was since … Read more

How can I pass an object to a JSP tag?

A slightly different question that I looked for here: “How do you pass an object to a tag file?” Answer: Use the “type” attribute of the attribute directive: <%@ attribute name=”field” required=”true” type=”com.mycompany.MyClass” %> The type defaults to java.lang.String, so without it you’ll get an error if you try to access object fields saying that … Read more

Can not find the tag library descriptor of springframework

I know it’s an old question, but the tag library http://www.springframework.org/tags is provided by spring-webmvc package. With Maven it can be added to the project with the following lines to be added in the pom.xml <properties> <spring.version>3.0.6.RELEASE</spring.version> </properties> <dependencies> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-webmvc</artifactId> <version>${spring.version}</version> </dependency> Without Maven, just add that jar to your classpath. In any … Read more

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

Use taglib definition in your JSP or better include it in every page by the first line. <%@ taglib prefix=”c” uri=”http://java.sun.com/jsp/jstl/core” %> There’s also fix jstl-1.2 dependency in your project. Also use servlet specification at least 2.4 in your web.xml. The maven dependencies are (maven is a open source development tool) <dependency> <groupId>jstl</groupId> <artifactId>jstl</artifactId> <version>1.2</version> … Read more

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