Environment: Tomcat 7.0.59; JRE 1.8.0_72 I suspect the answer to my problem is "You can't do that" but here goes:
A simple JSP that tries to get a Calendar instance and outputs the year: <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> <!DOCTYPE html> <html> <body> <c:set var="X" value="${ java.util.Calendar.getInstance() }"/> <c:set var="Y" value="${ X.get(java.util.Calendar.YEAR) }"/> The year is ${ Y } </body> </html> This presents a page that just says "The year is" but no year value. Is there some syntactical mojo I'm missing or is my best alternative to resort to a scriptlet? (And for context, I actually want to do something along these lines in a tag file.) --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org