I'm working on making an application (developed for tomcat 5.5) to be compatible with tomcat 7 (7.0.27). I'm having problems with jstl, simply tags are not output when I specify:
<web-app xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
version="3.0">
in my WEB-INF/web.xml file (previously, the 2.4 version was used).
An example .jsp file:
%@page
language="java"
pageEncoding="utf-8"
contentType="text/html;charset=utf-8"
buffer="none"
%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="uri:path-to-layout/layout" prefix="layout" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
<fmt:bundle basename="com.path.to.resources.Labels">
...
<td><input
name="j_username"
id="j_username"
maxlength="30"
accesskey="2"
type="text"
style="width: 150px;"
value="<c:out value="${pageContext.request.remoteUser}" default="" />" /></td>
Instead of expected output, I receive:
${pageContext.request.remoteUser}
as the value in the text field.
I use JSTL 1.2.1, Tomcat 7.0.27, JSP 2.2. The code compiles, and when I change web-app version in web.xml from 3.0 to 2.4 it works without outputting those values directly (although there are other issues which force me to use 3.0 version). Any ideas what could be the cause of this problem?