This week's book giveaway is in the Design forum.
We're giving away four copies of Building Microservices and have Sam Newman on-line!
See this thread 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 Building Microservices this week in the Design forum!
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "JWebPlus JSTL Q" Watch "JWebPlus JSTL Q" New topic


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 ]
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link:
subject: JWebPlus JSTL Q
It's not a secret anymore!