Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

mock example doubt

 
dolly shah
Ranch Hand
Posts: 383
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
1 <html>

2 <head><title>A Comment Test</title></head>

3 <body>

4 <h2>A Test of Comments</h2>

5 <!-- This is Html Hidden Comment -->


6 <%-- This is JSP Hidden Comment --%>

7 </body>

8 </html>

this JSP is from the mock exam. The options are

A

Line 5 is inserted in response but Line 6 is not inserted in response
B

Line 5 and Line 6 are inserted in response
C

Both Line 5 and Line 6 are not inserted in response
D

Line 5 is not inserted in response but Line 5 is inserted in response


-The answer is "A". But when I ran this JSP, I got only "A Test of Comments" as a output. Why line 5 is not added in the response?
 
vitesse wei
Ranch Hand
Posts: 100
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
from your explorer's menu,like IE,View-Source,you'll see it
 
dolly shah
Ranch Hand
Posts: 383
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks
 
Prasad Shindikar
Ranch Hand
Posts: 114
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
<!-- This is Html Hidden Comment -->

This line is added to the response, but when the clients like IE, Mozilla decide to render this page for the user; they see this HTML comment, and hence it is not displayed in the web page.

Hope this explanation helps.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic