When I try to test my jstl lib (jstl-1.1.2.jar & standard-1.1.2.jar) by adding it doesn't show anything in the browser.
this is my home.jspx:
<?xml version="1.0" encoding="utf-8"?>
<jsp:root
xmlns:jsp="http://java.sun.com/JSP/Page"
xmlns:c="http://java.sun.com/jsp/jstl/core"
xmlns="http://www.w3.org/1999/xhtml"
version="2.1">
<jsp:directive.page contentType="text/html" pageEncoding="UTF-8" />
<jsp:output omit-xml-declaration="true" />
<jsp:output doctype-root-element="HTML"
doctype-system="about:legacy-compat" />
<html lang="en">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>gdgdfgdg</title>
</head>
<body>
<h1>fsdf</h1>
<c:out value="Test"/>
</body>
</html>
</jsp:root>
Necessary jars are added. Can't figure out what's the problem.
EDITED:
This is the source code, the browser receives:
<!DOCTYPE HTML SYSTEM "about:legacy-compat">
<html lang="en">
<head>
<meta content="text/html; charset=utf-8" http-equiv="content-type"/>
<title>gdgdfgdg</title>
</head>
<body>
<h1>fsdf</h1>
<c:out value="TEST"/>
</body>
</html>
I added the following dependencies to maven and it loaded the right jars as described at the top properly..
<dependency>
<groupId>jstl</groupId>
<artifactId>jstl</artifactId>
<version>1.1.2</version>
</dependency>
<dependency>
<groupId>taglibs</groupId>
<artifactId>standard</artifactId>
<version>1.1.2</version>
</dependency>
Try this simple .jsp page if anything works at all. Test page uses random fmt and c features.
I have used these libraries in Tomcat6 server, but they are a bit old. Have not bothered to update cause Tomcat6 itself is a legacy anyway.
These are the files I use in Tomcat7 server, Tomcat7 has lib/el-api.jar and lib/jasper-el.jar which are fine. No need to update them.
Download fresh jars from http://search.maven.org/#browse|707331597 and http://search.maven.org/#browse|-1308691387 links.
Make sure use proper webapp specs version attribute in mywebapp/WEB-INF/web.xml file. This is Tomcat6 webapp.
This it Tomcat7 webapp.