Note that there are some explanatory texts on larger screens.

plurals
  1. POcannot load JSTL taglib within embedded Jetty server
    primarykey
    data
    text
    <p>I am writing a web application that runs within an embedded Jetty instance.</p> <p>When I attempt to execute a JSTL statement, I receive the following exception:</p> <blockquote> <p>org.apache.jasper.JasperException: /index.jsp(1,63) PWC6188: The absolute uri: <a href="http://java.sun.com/jsp/jstl/core" rel="noreferrer">http://java.sun.com/jsp/jstl/core</a> cannot be resolved in either web.xml or the jar files deployed with this application</p> </blockquote> <p>I have the following jars on the classpath</p> <ul> <li>ant-1.6.5.jar</li> <li>ant-1.7.1.jar</li> <li>ant-launcher-1.7.1.jar </li> <li>core-3.1.1.jar</li> <li>jetty-6.1.22.jar</li> <li>jetty-util-6.1.22.jar</li> <li>jsp-2.1-6.1.14.jar</li> <li>jsp-api-2.1.jar</li> <li>jstl-1.2.jar</li> <li>servlet-api-2.5-20081211.jar</li> <li>servlet-api-2.5-6.1.14.jar</li> <li>standard-1.1.2.jar</li> </ul> <p>My web.xml looks like this:</p> <pre><code>&lt;?xml version="1.0" encoding="ISO-8859-1"?&gt; &lt;web-app xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee h77p://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd" version="2.4"&gt; &lt;display-name&gt;test&lt;/display-name&gt; &lt;/web-app&gt; </code></pre> <p>My code looks like this:</p> <pre><code>&lt;%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %&gt; &lt;html&gt; &lt;body&gt; &lt;h2&gt;Hello World!&lt;/h2&gt; &lt;%= new java.util.Date() %&gt;&lt;br/&gt; ${1+2}&lt;br/&gt; &lt;c:out var="${5+9}"/&gt;&lt;br/&gt; &lt;/body&gt; &lt;/html&gt; </code></pre> <p>I started my embedded Jetty server like this:</p> <pre><code>Server server = new Server(80); WebAppContext context = new WebAppContext("pig-1.0-SNAPSHOT.war","/"); server.addHandler(context); server.start(); </code></pre> <p>I spent the past two days experimenting with various combinations of jar files, web.xml configurations, and tag library declarations, but to no avail.</p> <p>How can I get an embedded Jetty server up and running with full JSTL support?</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload