Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 361890 - JSTL not working with Tomcat 7
Summary: JSTL not working with Tomcat 7
Status: CLOSED NOT_ECLIPSE
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: m2e (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-10-25 03:56 EDT by kyu_23 CLA
Modified: 2021-04-19 13:27 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description kyu_23 CLA 2011-10-25 03:56:14 EDT
Build Identifier: 20110916-0149

JSTL does not work with Tomcat 7 and Maven plug-in in Eclipse

pom.xml contain following
    <dependencies>
        <dependency>
            <groupId>javax</groupId>
            <artifactId>javaee-web-api</artifactId>
            <version>6.0</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
        	<groupId>jstl</groupId>
        	<artifactId>jstl</artifactId>
        	<version>1.2</version>
        </dependency>
    </dependencies>

jsp containing jstl is as follows
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> 
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
   "http://www.w3.org/TR/html4/loose.dtd">

<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>Basic JSTL</title>
    </head>
    <body>
<table>
<tr><th>Value</th>
    <th>Square</th></tr>
<c:forEach var="x" begin="0" end="10" step="2">
  <tr><td><c:out value="${x}"/></td>
      <td><c:out value="${x * x}"/></td></tr>
</c:forEach>
</table>


    </body>
</html>

You get following error
SEVERE: Servlet.service() for servlet [jsp] in context with path [/mvnjstl] threw exception [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] with root cause
org.apache.jasper.JasperException: 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
	at org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:53)

This works when I manually create the war file from maven and deploy the war file into Tomcat and so it seems like there might be an integration issue between Eclipse, Tomcat, and Maven plugin

Reproducible: Always

Steps to Reproduce:
1. Create maven project
2. Create pom.xml described in details
3. Create sample jstl file based on description in details
4. Run the sample in Tomcat 7
5. See error
Comment 1 Igor Fedorenko CLA 2011-10-25 07:38:42 EDT
m2e does not provide direct support for JEE development. Assuming you are using m2e/wtp integration, please use https://issues.sonatype.org/browse/MECLIPSEWTP to report problems.
Comment 2 Denis Roy CLA 2021-04-19 13:27:20 EDT
Moved to https://github.com/eclipse-m2e/m2e-core/issues/