Creating variables in JSTL is incredibly easy. First, add the following line to the top of your JSP page.
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
Use c:set to create a variable. In this example, a variable called name is created with a value of Jeremy. This is a key:value pair.
<c:set var="name" value="Jeremy"/>
This markup should print the value of the variable called name, which will print Jeremy in this example.
${name}
In this example, when running the app, "Jeremy" is displayed.