JSP Tutorials

JSP scriptlet tag
adplus-dvertising
Previous Home Next

JSP Scriptlet tag (Scripting elements)

JSP Scriptlet are used java code which can be written inside the jsp psge with scriptlet tag.

what is scriptlet elements

In the scripting elements is able to insert java code inside the jsp.

There are three types of scripting elements:

  1. scriptlet tag
  2. expression tag
  3. declaration tag

JSP scriptlet tag

In the scriptlet tag is used to execute java source code in JSP.

Syntax is as follows:

<%  java source code %>  

<%  java source code %>  

Example

    <html>  
    <body>  
    <% out.print("welcome to jsp"); %>  
    </body>  
    </html>  

    <html>  
    <body>  
    <% out.print("welcome to jsp"); %>  
    </body>  
    </html>  
Previous Home Next