tags:

views:

41

answers:

1

I have a .jsp page that begins with

<%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %>
<%@ taglib uri="/WEB-INF/mytags.tld" prefix="mytags" %>

With the header of mytags.tld having the following content:

<taglib>
<tlib-version>1.0</tlib-version>
<jsp-version>1.2</jsp-version>

Expressions are supported by the core tags, so that when I do something like the following:

<c:out value="${myPageBean.firstName}"/>

the expression is evaluated as expected.

However, when I try to have my custom tag evaluate an expression, the .jsp refuses to compile.

<mytags:sayHello firstName="${myPageBean.firstName}"/>

If expressions weren't functioning anywhere on the page, I'd have an easier time sorting this out, but does it make sense that the core tags behave as expected, while my custom tags don't? I'm working with Tomcat 4.1

+1  A: 

Since you are using Tomcat 4.1, you have JSP 1.2. EL support was introduced into JSP spec in version 2.0, so you doesn't have it. Therefore JSTL 1.0 uses its own implementation of expression language accessible via ExpressionUtil.

axtavt
This is exactly what I was looking for. Thanks.
unsquared