Vijay Kumar
all comment in jsp
1 Answer(s)      4 years and 9 months ago
Posted in : JSP-Interview Questions

Defined all comment in jsp ?

Advertisement
View Answers

October 29, 2010 at 5:18 PM


jsp support two type comment : JSP comment and HTML comment

JSP Comment:

<%-- comment text --%>

this is the format of the JSP comments specified in the JSP Specifications. A JSP Comment is removed by the JSP Engine at the translation time itself and the compilation unit doesn't contain them. Comments don't need to ne compiled as we all know that they are not executed and they simply serve the purpose of making the source code more readable, and maintainable.

HTML Comment:

<!-- comment text -->

this is the syntax of an HTML comment as specified by the HTML Specifications. A JSP page considers this as a normal HTML tag and hence it doesn't remove them. All HTML comments are maintained in the response and one can easily see them jusy by viewing the page source of the rendered HTML page in the browser.

jsp scriptlet tag also support java comment and these comments are treated the same way they are treated in a normal Java program.They all are removed before compilation and like JSP Comments they are also not part of the compilation unit.It defined as:

<%
        String name;  
        // java comment

       /*
         multiple 
         line
         java 
         comment 
       */

    %>









Related Tutorials/Questions & Answers:
all comment in jsp
all comment in jsp  Defined all comment in jsp ?   jsp support two type comment : JSP comment and HTML comment JSP Comment: <%-- comment text --%> this is the format of the JSP comments specified in the JSP
JSP Comment and HTML Comment
JSP Comment and HTML Comment  Difference between JSP Comment & HTML Comment ?   JSP Comments are removed by the JSP Engine during the translation phase (JSP Comments are not even part of the compilation unit
Advertisements
COMMENT & HIDDEN COMMENT IN JSP
COMMENT & HIDDEN COMMENT IN JSP In this section , we will learn how to implements comment & hidden comment in JSP. COMMENT : Comment generates a comment that is sent to the client. The comment use in JSP is very similar
Hidden Comment
Hidden Comment  What is a Hidden Comment ?   Hi, Hidden Comments are JSP comments. A comments that documents the JSP page but is not sent to the client. The JSP engine ignores a hidden comment, and does not process any
Difference between documentation comment and multiline comment in java?
Difference between documentation comment and multiline comment in java?  Difference between documentation comment and multiline comment in java
javascript comment syntax html
javascript comment syntax html  javascript comment syntax html
JavaScript Comment Tag
JavaScript Comment Tag  How to write comment in JavaScript
How to comment javascript code?
How to comment javascript code?  How to comment javascript code
Comment PHP Script - MobileApplications
Comment PHP Script  I wanted to write a PHP Script that makes it possible to post the comment on reply. A user can add his comment to any of the reply in the forum. How can I do
sql add comment to column
sql add comment to column  Sql query to add comments to column
JavaScript Comment
JavaScript Comment: Comments are placed within the programming language coding to hide all those statements, which are not supposed to run. Comment make... text in a program, at that situation we should put all those codes within comments
HTML5 comment tag Example, Definition of <!--  --> comment tag.
HTML5 comment tag Example,, Definition of <!--  --> comment tag. In this tutorial, we will introduce you to the <!-- --> comment tag of HTML5. This tag is used to insert the comment inside the source code. The text
common database jsp file for all the jsp files in the application
common database jsp file for all the jsp files in the application  hi... use of this single jsp file while connecting to database rather than writing connectivity code in all the jsp pages . send me the code for that . thanks
Use of Comment Function in PHP
, at that case we should put all those codes within comments. Line of Comments...;; /* * This * is * called * Multiple * Line * comment*/ echo "This is not a comment"; ?> Output: This is not a comment
HOW TO CREATE COMMENT IN WEBSITE AND CONNECT TO DATABASE?
HOW TO CREATE COMMENT IN WEBSITE AND CONNECT TO DATABASE?  HOW TO CREATE COMMENT IN WEBSITE AND CONNECT TO DATABASE
HOW TO CREATE COMMENT IN WEBSITE AND CONNECT TO DATABASE?
HOW TO CREATE COMMENT IN WEBSITE AND CONNECT TO DATABASE?  HOW TO CREATE COMMENT IN WEBSITE AND CONNECT TO DATABASE
Excel Cell Comment
Excel Cell Comment In this section, you will learn how to add a comment with a excel cell using Apache POI API. A comment is associated with a cell. It is a rich text note. The comment will be showing separately in rectangular text
Access all the fields from table through JSP
Access all the fields from table through JSP.... This is first jsp page that has a link 'show data from table', which displays all... on the link given in the first jsp page,that calls this jsp page and show all data
upload and download all kinds of files in jsp - Java Beginners
upload and download all kinds of files in jsp  how to upload and download all kinds of files ex: image file,pdf,.xls in jsp. your help is highly appreciated.  we can upload the all type s of files into oracle 10g
linking jsp with database using classes and methods and then access them all in to my jsp page - JSP-Servlet
linking jsp with database using classes and methods and then access them all in to my jsp page  how to connect jsp page with mysql using classes... all with the help of java beans in u'r own jsp page
How do i do the coding for 'leaving a comment' in java
How do i do the coding for 'leaving a comment' in java  i am designing a webpage.In my webpage i want to add the option of adding a comment by the readers of the page.how do i do
Insert a Processing Instruction and a Comment Node
Insert a Processing Instruction and a Comment Node  ... a Processing Node and Comment Node in a DOM document. JAXP (Java API for XML... an instance of an XMLDOMElement. Comment c = doc.createComment("
i want to do a project using jsp and servlet....What are all the materials i need to study
i want to do a project using jsp and servlet....What are all the materials i need to study   i want to do a project using jsp and servlet....What are all the materials i need to study ?   Please visit the following
Simple program to combine all html,ajax,java,servlets,jsp,json - Java Beginners
Simple program to combine all html,ajax,java,servlets,jsp,json  Hi, I learned Java,servlets,jsp basics, html, ajax, json and css. I want to do a program which is a combination of all those technology. For that, i planned
How to display all the Select values from the MySQL database table in where condition= In JSP?
the condition,but i want all the rows to be displayed in the jsp file. Plz...How to display all the Select values from the MySQL database table in where condition= In JSP?  **Hi in jsp,SQL select statement,i am unable
How to display all the rows in JSP ,MySQL select condition statement IN dept_table
How to display all the rows in JSP ,MySQL select condition statement IN dept_table  I iam unable to display all the rows in JSP select statement from... is displayed.@select * from department where dept_no=10;My display code in JSP
jsp mysql
........... like that all requests nd comments should be display through jsp and mysql...jsp mysql  actually i want a page that has two frames nd in 1 frame... to reflect in other frame followed by a comment box and also after giving comment
Creates element node, attribute node, comment node, processing instruction and a CDATA section
Creates element node, attribute node, comment node, processing...; This Example shows you how to Create an Element node ,Comment node.... Comment node = doc.createComment("Comment for company"
JSP - JSP-Interview Questions
A comment marks text or lines that the JSP container should ignore. A comment is useful when you want to comment out part of your JSP... are the comments in JSP(java server pages)and how many types and what are they.Thanks inadvance
size of all primitive data
size of all primitive data   java program for to find the size of all primitive data types in java
mysqldump all databases
mysqldump all databases  How to take the backup of complete data including all the databases in the MySQL Server? Is there one command to take... is 5.5.23. Thanks   Hi, To take the backup of all the database