java - JSTL absolute URI cannot be resolved -


when load webpage following error occurs, i'm trying use jstl:

the absolute uri: http://java.sun.com/jsp/jstl/core cannot resolved in either web.xml or jar files deployed application

i using apache tomcat webserver. pom.xml maven file:

<?xml version="1.0" encoding="utf-8"?> <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/xsd/maven-4.0.0.xsd">     <modelversion>4.0.0</modelversion>      <groupid>my.own</groupid>     <artifactid>web</artifactid>     <version>1.0</version>      <build>         <plugins>             <plugin>                 <artifactid>maven-compiler-plugin</artifactid>                 <configuration>                     <source>1.8</source>                     <target>1.8</target>                 </configuration>             </plugin>         </plugins>     </build>      <dependencies>         <dependency>             <groupid>jstl</groupid>             <artifactid>jstl</artifactid>             <version>1.2</version>         </dependency>     </dependencies> </project> 

this index.jsp file:

<%@ page contenttype="text/html;charset=utf-8" language="java" %> <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> <!doctype html> <html> <head>     <meta http-equiv="content-type" content="text/html; charset=utf-8" />     <title>for each</title> </head> <body>     odd numbers 20:     <c:foreach var="i" begin="0" end="20" step="2">         ${i} &nbsp;     </c:foreach> </body> </html> 

and web.xml:

<?xml version="1.0" encoding="utf-8"?> <web-app xmlns="http://xmlns.jcp.org/xml/ns/javaee"          xmlns:xsi="http://www.w3.org/2001/xmlschema-instance"          xsi:schemalocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd"          version="3.1">  </web-app> 

thanks!

enter image description here


Comments

Popular posts from this blog

sublimetext3 - what keyboard shortcut is to comment/uncomment for this script tag in sublime -

java - No use of nillable="0" in SOAP Webservice -

ubuntu - Laravel 5.2 quickstart guide gives Not Found Error -