How to make Expression Language Work

In web.xml use the following header:

<web-app xmlns=”http://java.sun.com/xml/ns/j2ee&#8221;
xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance&#8221;
xsi:schemaLocation=”http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd&#8221;
version=”2.4″>

In your JSPs include the directive:

<%@ taglib prefix=”c” uri=”http://java.sun.com/jsp/jstl/core”%&gt;

Now you can use EL code in your JSP like for example ${user.name}.

Note: You need a JSP 2.0 container.