❮ Previous Next ❯

JSP expression tag

The code placed within JSP expression tag is written to the output stream of the response. Here there is no need to write out.print() to display output. It is mainly used to print the values of variable or method. The general form is:

<%= statement %>

Example1;

<html>
<body>
<%= "welcome to java8s.com" %>
</body>
</html>

Example2:

demo.jsp

<html>
<body>
<form action="welcome.jsp">
<input type="text"name="uname">
<input type="submit"value="ok">
</form>
</body>
</html>

Welcome1.jsp

<html>
<body>
<%= "Welcome "+request.getParameter("uname") %>
</body>
</html>

❮ Previous Next ❯


Follow Us




  Tutorials

Popular Links

Contact Us

address Plot No-741,2ND Floor
Opp. Bhagabati Temple,Jayadev Vihar
      Bhubaneswar-751013
      Email: info@silantechnology.com
      Phone: 0674-2361252
address
39877, sundale dr, apt#101, Fremont, California 94538, USA
       Phone: +1(262)388-7619

facebook twitter google linked in

© 2018 Silan Technology. All Rights Reserved