Reputation: 9163
Used this command to start the web app using jetty-runner java -jar prject123/web/target/dependency/jetty-runner.jar project123/web/target/*.war
The jstl code I have is as simple as this: <c:out value="hi there"></c:out>
, the source code I get from the rendered web page is <c:out value></c:out>
so seems that the jstl tags are completed unparsed .
I should mention that other than using jetty-runner, other ways to start the web app seems to work well with jstl tag, for example mvn -pl project123/web jetty:run-exploded
I have been really struggling with this issue. Any suggestion would be greatly appreciated!
To answer Daniel's questions: I am using 8.1.0.RC4 for jetty-runner and maven jetty plugin. Also I have included jstl 1.2 in my pom file.
<dependency>
<groupId>jstl</groupId>
<artifactId>jstl</artifactId>
<version>1.2</version>
</dependency>
And the jsp page source code is
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!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>JSP Page</title>
</head>
<body>
<h1>Hello!!</h1> <c:out value="you!"> </c:out>
</body>
</html>
Upvotes: 2
Views: 1734
Reputation: 1340
those who ran into this question/answer while looking for jstl issues, the following link could be helpful. http://wiki.eclipse.org/Jetty/Howto/Configure_JSP
Upvotes: 0
Reputation: 526
I think you also need the standard taglibs dependency
<dependency>
<groupId>taglibs</groupId>
<artifactId>standard</artifactId>
<version>1.1.2</version>
</dependency>
and maybe change the jstl dependency to javax.servlet?
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>jstl</artifactId>
<version>1.1.2</version>
</dependency>
Upvotes: 0
Reputation: 9163
java --lib project123/web/$PATH_TO_THE_LIB -jar prject123/web/target/dependency/jetty-runner.jar project123/web/target/*.war
--lib tells jetty runner to load the jars in the specified path.
Upvotes: 2