This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes JWebPlus JSTL Q Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "JWebPlus JSTL Q" Watch "JWebPlus JSTL Q" New topic
Author

JWebPlus JSTL Q

Kedar Dravid
Ranch Hand

Joined: May 28, 2004
Posts: 333
Consider the following:

Assuming that the following line of code has already occured in a scriptlet in a JSP page, which of the given JSTL code snippet will output the right string in the resulting HTML so that the message in 'htmltext' is displayed in HEAD1 style on the browser?

request.setAttribute("htmltext", "<h1>This is heading</h1>");

Given answers:
1) <c ut value="${htmltext}" escapeXml='false' />
2) ${htmltext}

IMO, answer 2 is incorrect since it is actually an EL expression.
Please confirm.
PNS Subramanian
Ranch Hand

Joined: Jul 13, 2004
Posts: 150
And the first one doesn't give a value!!!
Feel answer 2) is correct ${"htmltext"}- can't EL be used in conjunction with JSTL ?

[ July 11, 2005: Message edited by: PNS Subramanian ]
[ July 11, 2005: Message edited by: PNS Subramanian ]
 
Don't get me started about those stupid light bulbs.
 
subject: JWebPlus JSTL Q