TODAY JAVA SCHOOL

In java school, programming, design, computer general knowledge, web application, software, web services, social media, digital marketing, oops, concept of programming language, oops feature, console media, graphics medium, first programming, c, c ++ , Java, PHP, SQL, MySQL, HTML, HTML_5, J_query, JavaScript, Bootstrap, Framework, images with logos, examples, shared and explained.

https://www.amazon.in/b?node=26373545031&linkCode=ll2&tag=1234567801cdb-21&linkId=3b9882431b00409b44141e0344b35a15&language=en_IN&ref_=as_li_ss_tl

Breaking

Monday 20 April 2020

JSP Expression In Java | what is JSP Expression In Java | JSP Expression In Java In Hindi

JSP Expression Tag

The code placed within JSP expression tag is written to the output stream of the response. So you need not write out.print() to write data. It is mainly used to print the values of variable or method.

dwonload the iamge of jsp expression tags

Fig: Jsp expression 


Syntax of JSP expression tag

                 <%=  statement %>

   Example of JSP expression tag

   In this example of jsp expression tag, we are simply displaying a welcome message.

  <html>  
   <body>  
   <%= "welcome to jsp" %>  
   </body>  
   </html>  


Example of JSP expression tag that prints current time

To display the current time, we have used the getTime() method of Calendar class. The getTime() is an instance method of Calendar class, so we have called it after getting the instance of Calendar class by the getInstance() method.


index.jsp

   <html>  
   <body>  
   Current Time: <%= java.util.Calendar.getInstance().getTime() %>  
   </body>  
  </html>  

No comments:

Post a Comment