One isn't better than the other. They help in a different way.
1) java comments : // and  /* */
might be used mainly to temporarily comment out some code that might be
causing trouble.

2) JSP comment <%--  --%>
Good to use for real comments on your JSP page. I.e. code documentation
Might also be used to temp delete piece of code

3) HTML comments <!--  -->
Good for Debugging purposes. This lets you output some values and info (like
timings, ID #, assertions ...) without messing up your output. But there's
still an easy way to see them (at least easier than server side logging or
so.

Geert

> -----Original Message-----
> From: A mailing list about Java Server Pages specification and reference
> [mailto:[EMAIL PROTECTED]]On Behalf Of Bruce Geerdes
> Sent: donderdag 19 april 2001 22:30
> To: [EMAIL PROTECTED]
> Subject: Re: putting a comment in jsp code
>
>
> --- Florian DREVET <[EMAIL PROTECTED]> wrote:
> > Same as Java in scriptlet parts, same as HTML in HTML parts.
>
> Using HTML comments
>
> <!-- -->
>
> are fine if you don't mind those comments appearing in the final HTML
> page (viewable via browser's view source).  If you prefer to keep those
> comments private, however, it's better to use the JSP commenting:
>
> <%-- --%>
>
> Bruce
>
>
> >
> > -----Message d'origine-----
> > De : A mailing list about Java Server Pages specification and
> > reference
> > [mailto:[EMAIL PROTECTED]]De la part de BERWART Thierry
> > Envoyé : jeudi 19 avril 2001 09:13
> > À : [EMAIL PROTECTED]
> > Objet : putting a comment in jsp code
> >
> >
> > Hello,
> >
> > How can I put a code in comment in JSP ?
> >
> > Thanks
> >
> > Thierry
>
>
>
> __________________________________________________
> Do You Yahoo!?
> Yahoo! Auctions - buy the things you want at great prices
> http://auctions.yahoo.com/
>
> ==================================================================
> =========
> To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
> JSP-INTEREST".
> For digest: mailto [EMAIL PROTECTED] with body: "set
> JSP-INTEREST DIGEST".
> Some relevant FAQs on JSP/Servlets can be found at:
>
>  http://java.sun.com/products/jsp/faq.html
>  http://www.esperanto.org.nz/jsp/jspfaq.html
>  http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
>  http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
>

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

Reply via email to