• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

About p.384 of Head First

 
Himai Minh
Ranch Hand
Posts: 1360
7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
On p.384, it says:

<div class="tipBox">
<b>Tip of the Day:</b> <br/><br/>
<%=pageContent.getCurrentTip() %>
</div>

First of all, it should be something like this:

Reference :http://www.oreilly.com/catalog/errata.csp?isbn=9780596516680


Secondly,


But I think this note is not right:
Whatever this evaluates to is treated as standard HTML , so any HTML tags are rendered, not displayed as text.


When I tried this by adding <b></b> around the ${pageContext...} , the current tip is displayed as bold.


 
Frits Walraven
Creator of Enthuware JWS+ V6
Saloon Keeper
Pie
Posts: 2533
113
Android Chrome Eclipse IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Try adding bold-tags around the phrase:

will it print "wash your hand" in bold or will it print
 
Himai Minh
Ranch Hand
Posts: 1360
7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, Frits. Thanks for your reply.
I tried this:

The "wash your hand" is bold as shown in the attachment.
washYourHand.PNG
[Thumbnail for washYourHand.PNG]
 
H Yin
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Himai Minh wrote:On p.384, it says:

<div class="tipBox">
<b>Tip of the Day:</b> <br/><br/>
<%=pageContent.getCurrentTip() %>
</div>

First of all, it should be something like this:


The book assumes that there is a pageContent bean with a property currentTip, although the code for the bean is not given.


Secondly,


But I think this note is not right:
Whatever this evaluates to is treated as standard HTML , so any HTML tags are rendered, not displayed as text.


The html tags in the tip text are intended to show up as tip text. But when it is rendered in a browser, the html tags are not shown. By saying "so any HTML tags are rendered, not displayed as text", it means that the tip text is not shown as it should be if it contains html tags.

 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic