Posted By

mattstopa on 02/08/10


Tagged


Versions (?)

JSP Basics - calling Java inside of JSP's


 / Published in: Java
 

  1. <% out.println(new java.util.Date()); %> // Scriptlet Syntax
  2.  
  3.  
  4. <%= new java.util.Date() %> // Expression element syntax
  5.  
  6. // Declaration element syntax
  7. // Purpose is to initialize variables and methods and make them available to other Declarations, Scriptlets, and Expressions
  8. <%! public java.util.Date PrintDate()
  9. {
  10. return(new java.util.Date());
  11. }
  12. %>

Report this snippet  

You need to login to post a comment.