EL renders raw text, including HTML

The mystery is solved when you look at the actual HTML that is generated...

image with no caption

So, the “<b></b>” portion of the tip is being sent in the output stream, but the web browser is simply rendering it as raw HTML—by bolding an empty space on the page.

So, of course the user does not see the “<b></b>” tags on the screen.

The same is true for JSP expression tags...

image with no caption

... and for the jsp:getProperty standard action

image with no caption

Flex Your Mind

OK, so the tip string is being sent to the output stream, but Documents-R-Us wants to convert HTML special characters into a format that is rendered properly in their tips. So we want to send “&lt;” in order for the user to see the actual < character in the browser, and “&gt;” to produce the > character.

How would you accomplish this?

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset