It's not a secret anymore!
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes c:set Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "c:set" Watch "c:set" New topic


Ranjan Pwar

Joined: Dec 12, 2008
Posts: 13
with c:set we can use expression as value of value attribute but when i try this it is showing exception:
( Attribute value application.getAttribute("userLevel") is quoted with " which must be escaped when used within the value)

<c:set var="userLevel" scope="session" value="<%= application.getAttribute("userLevel") %>" />
Kathiresan Chinna
Ranch Hand

Joined: Aug 17, 2008
Posts: 115

you can use EL

or try this
<c:set var="userLevel" scope="session" value="<%= application.getAttribute(\"userLevel\") %>" />

I agree. Here's the link:
subject: c:set
It's not a secret anymore!