JSP EL Lecture Notes
JSP EL Lecture Notes
Expression Language (EL) in JSP is used to simplify the access to data stored in JavaBeans
components, request/session/application attributes, and more without using Java code in
the JSP page.
1. Syntax:
Basic format: ${variableName}
1. Page Scope
2. Request Scope
3. Session Scope
4. Application Scope
// In Servlet
request.setAttribute("username", "May Zin Htun");
// In JSP
Welcome, ${username}!
6. Common EL Objects:
param: ${param.name} (Form parameter)
paramValues: ${paramValues.name} (Multiple form values)
Expression Language helps you write cleaner, simpler JSP pages. Practice using EL in your
form handling and dynamic display pages. ❤️