First of all, I'm a newbie to JSP :). I've been trying to use JSTL today, version 1.2. I included info in my xml and the dependency in the pom. There is also <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
in the jsp.
The error message I get is: /index.jsp(3,15) PWC6188: The absolute uri: http://java.sun.com/jsp/jstl/core cannot be resolved in either web.xml or the jar files deployed with this application
I've been rereading previous forum posts, but nothing helped so far. Actually, different posts suggest different things. So a simple tutorial would be very much appreciated :).
Thanks a TON already! my web.xml
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
version="2.5" xmlns="http://java.sun.com/xml/ns/javaee">
</web-app>
my index.jsp <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %> <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> JSTL Functions
<c:out value="this is simply some text" />
<br>
<dependencies>
<!-- JUnit to run the tests -->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.10</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>javax.servlet.jsp</groupId>
<artifactId>jsp-api</artifactId>
<version>2.1</version>
</dependency>
<!-- Java servlet API -->
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
<version>2.5</version>
</dependency>
<!-- Velocity templating engine -->
<dependency>
<groupId>org.apache.velocity</groupId>
<artifactId>velocity</artifactId>
<version>1.7</version>
</dependency>
<!-- JSTL -->
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>jstl</artifactId>
<version>1.2</version>
</dependency>
</dependencies>
structure of the deployed app:
- test
- index.jsp
- META-INF
- WEB-INF
- classes
- lib
- commons-collections-3.2.1.jar
- commons-lang-2.4.jar
- jstl-1.2.jar
- velocity-1.7.jar
- web.xml
- test.war