The syntax for a JSP expression
<%= any Java expression that can be converted to a string % >
The syntax for getting a parameter from the implicit request object
request.getParameter(parameterName);
Examples that use scriptlets and expressions
A scriptlet and expression that display the value of the firstName parameter
<%
String firstName = request.getParameter("firstName");
%>
The first name is <%= firstName %>
.
An expression that displays the value of the firstName parameter
The first name is <%= request.getParameter("firstName") %>
.