public class ELExample {
private String message;
public String getMessage() {
return message;
}
public void setMessage(String message) {
this.message = message;
}
}
jsp
<%@ page import="com.example.ELExample" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html>
<html>
<head>
<title>EL Example</title>
</head>
<body>
<c:set var="example" value="com.example.ELExample" />
<c:set target="${example}" property="message" value="Hello, EL API!" />
<c:out value="${example.message}" />
</body>
</html>