Category Archives: Uncategorized

JSTL vs. EL – What’s the Difference?

Expression Language (EL) is a way to create an expression on the Java objects, of the form a.b.c (which is equivalent to a.getB().getC(), or a.getB().isC(), etc. So, it is a way to create a readable expression of Java. A common use case, in JSP, you can write: ${} which will write the Object/String returned by the bean user, using Java equivalent user.getName().

JSTL is the tag library. Such as <c:if> etc.

Using JSTL and EL together You can use JSTL and EL together, such as:

<c:if test="${}">
Your account is active.

<c:if test="${not}">
Your account is NOT active.

Here the c:if portion is JSTL and part is EL.