This tutorial contains description of Expressions which is one of JSP page element.
Expressions in JSPs is used to output any data on the generated page. These data are automatically converted to string and printed on the output stream. It is an instruction to the web container for executing the code with in the expression and replace it with the resultant output content. For writing expression in JSP, you can use <%= and %> tags
<%= expression %>
semicolon is not permitted within a JSP expression but for same, semicolon is
used for scriptlets. Expressions are checked at run time so it has access to all
of the JSP implicit objects.
<%@page import="java.io.PrintWriter"%><html> <head> <title>Scriptlet Example</title> </head> <body> <%!int a = 10; int b = 20;%> <% int sum = a + b; %> Sum of a= <%=a%> and b= <%=b%> is : <%=sum%> </body> </html>
If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.
Ask your questions, our development team will try to give answers to your questions.