Try to add:
<%@ page isELIgnored="false" %>
to the header of your jsp page. For example:
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ page session="false" %>
<%@ page isELIgnored="false" %>
<html>
<head>
<title>Home</title>
</head>
<body>
<h1>
Hello world!
</h1>
<P> The time on the server is ${serverTime}. </P>
</body>
</html>
EDIT:
Inspired by your comment:
If you want to programmatically enable EL expressions in JSP without loading/definition of a web.xml file you have to add the ContextConfig LifecycleListener:
rootContext.addLifecycleListener(new ContextConfig());
a full workin example (Tomcat embedded 7.0.50 with JDK 1.7):
public static void main(String[] args) throws LifecycleException
{
// setup server
final Tomcat tomcat = new Tomcat();
tomcat.setBaseDir("."); // location where temp dir is created
tomcat.setPort(8080);
// configure context
final File applicationPath = new File("./webapp"); // todo: change to your location
Context rootContext = tomcat.addContext("/", applicationPath.getAbsolutePath());
rootContext.addLifecycleListener(new ContextConfig());
// JSP and Default Servlet setup, mime type mapping and welcome files
Tomcat.initWebappDefaults(rootContext);
// start server
tomcat.start();
tomcat.getServer().await();
}
with this solution you don't need to explicitly state page directives in your JSP files.
HINT: dont forget to delete your "work" (=temporary tomcat directory) after makin changes and before restarting your server. Compiled JSP's are chached there and you may get old results!
HTH,