Explain Jsp Expressions



Jsp Expression:-

As part of Jsp’s we can provide the Jsp Expressions using the Syntax:

<%=

java expression

%>

For Ex:-

<% int i=10;

int j=20;

String s1=”xxx” ,s2=”yyy”;

%>

<%= i+j %>

<% new  java.util.Date() %> <br>

<%= s1.equals(s2) %> <br>

<%= request.getHeader(“User_Agent “) %> <br>

<%= application.getInitParameter(“cpone”) %>

Jsp Expressions is nothing but showing the values of the variable as the output on the browser.

Random Posts

  • Collection FrameWork
  • JSP Interview Questions
  • Java lang package interview questions
  • Define ServletInputStream
  • Difference between session.save() and session.saveOrUpdate()

Post a Comment