Jsp expressions known as those kind of expressions that are containing the scripting language values. To Display the expression value we create a HTML tags page that will use to fill the required fields that will be displayed according to need.
Here we redirect the html page on an actual page where all the functions will be elaborate. As for this we made two forms like first which will use as the HTML code then second that will take the reference of first page. The value which it will receive from first form will displayed on the web browser as Output both form contains the required attribute and java packages to for io exceptions etc..let’s take a look on the program we made.
<html>
<head>
<title><jsp_Expression></title>
</head>
<body>
<form action=”Expression.jsp” method=”get”>>
<table cellpadding=”2px” cellspacing=”1px” bgcolor=”#f7f9fb” width=”400px”align=”center”>
<tr>
<td align=”center” colspan=”2″>
<span class=”text”><h2>Identity</h2></span></td>
</tr>
<tr>
<td align=”center” width=”60%”>User Name: <input type=”text” name=”text”maxlength=”40″/></td>
</tr>
<tr>
<td align=”center”><input type=”submit” value=”Submit” /></td>
</tr>
</form>
</table>
</body>
</html>
Expression.jsp
<html>
<head>
<title><Expression></title>
</head>
<body>
<%String identity= request.getParameter(“text”);%>
<%
if(identity!=null)
{
%>
<b><br><br><h2 align=”center”>
<%=identity %></h2></b></br>
<%
}
%>
</body>
</html>