web.xml - JSTL error - The absolute uri: http://java.sun.com/jsp/jstl/core cannot be resolved -


first of all, i'm newbie jsp :). i've been trying use jstl today, version 1.2. included info in xml , dependency in pom. there <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> in jsp.

the error message is: /index.jsp(3,15) pwc6188: absolute uri: http://java.sun.com/jsp/jstl/core cannot resolved in either web.xml or jar files deployed application

i've been rereading previous forum posts, nothing helped far. actually, different posts suggest different things. simple tutorial appreciated :).

thanks ton already! 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 text" />    <br>  <dependencies>     <!-- junit run 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 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

i think there bug jetty8 , jstl. using jetty7 instead solved problem :)


Comments

Popular posts from this blog

Perl - how to grep a block of text from a file -

delphi - How to remove all the grips on a coolbar if I have several coolbands? -

javascript - Animating array of divs; only the final element is modified -