Learn jsp tags and programming | Under Java Training Course

  • 0 Replies
  • 986 Views
*

aquanetta

  • Newbie
  • *
  • 2
  • +0/-0
    • View Profile
Learn jsp tags and programming | Under Java Training Course
« on: September 22, 2011, 05:23:29 AM »
Learn jsp tags and programming | Under Java Training Course

Comments in JSP

Plain HTML Comments
   Ex: <!-- hello --> 
   Response: <! -- hello -->

HTML Comments containing JSP tags
   Ex: < !-- value of 10 + 20 is <%= 10 + 20 %> --> 
   Response: <! -- value of 10 + 20 is 30  -->

JSP Comment tag
   Ex: <%-- This is a JSP comment -- %>
   Response:

Java Comments
   Ex:    <%   /* int x;
            float f;    */
         void meth1()
         {
            //out.println( “hello output” );
         }      %>


JSP tag types

Declaration tags

•   For variable and method declaration
•   
•   Format: <%!    Variable declaration;
            Method declaration;
           %>
Expression tags

•   For inserting Java expressions
•   
•   format: <%= expression %>

Scriptlets
•   To embed java code blocks
•   format: <% code block %>

Directives
•    To specify information that affect
    the whole JSP program
•    format:    <%@ directive_type
       directive_attribute    %>

Action tags
•   Used to work with standard objects
format: <jsp:action_name action_attributes />
« Last Edit: September 22, 2011, 07:51:03 AM by Webhelpforums »

 




See Our Webmaster Tools for Windows and Mac

A1 Sitemap Generator
      
A1 Website Analyzer
      
A1 Keyword Research
      
A1 Website Download
      
A1 Website Search Engine
      
A1 Website Scraper