JSP page:
<%@ page language="java" contentType="text/html; utf-8"
pageEncoding="utf-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!DOCTYPE html>
<html lang="sv" dir="ltr">
<head>
<meta charset="utf-8">
<title>Insert title here</title>
</head>
<body>
<c:forEach begin="1" end="5" var="current">
<c:out value="${current}"/>
<p>${current}</p>
</c:forEach>
</body>
</html>
Maven POM file:
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>GroupName</groupId>
<artifactId>AppName</artifactId>
<packaging>war</packaging>
<version>0.0.1-SNAPSHOT</version>
<name>Maven Webapp</name>
<url>http://maven.apache.org</url>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>8.0.19</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>commons-codec</groupId>
<artifactId>commons-codec</artifactId>
<version>1.14</version>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>jstl</artifactId>
<version>1.2</version>
</dependency>
</dependencies>
<build>
<finalName>Whatever</finalName>
</build>
</project>
Instead of the output 1 2 3 4 5 I get ${current} ${current} ${current} ${current} ${current}
I code in eclipse, and I use maven for dependencies. I run code in local Tomcat Server. Might be to little background info, but its hard since Eclipse + Tomcat + Maven = 100000 ways of doing stuff, weird quirks, configurations etc. Hoping it might be something obvious.