This week's book giveaway is in the Jobs Discussion forum.
We're giving away four copies of Customer Requirements for Developers and have Marcho Behler on-line!
See this thread for details.
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


Win a copy of Customer Requirements for Developers this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "c:set" Watch "c:set" New topic
Author

c:set

Ranjan Pwar
Greenhorn

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
Hi,

you can use EL

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


Kathir
 
Don't get me started about those stupid light bulbs.
 
subject: c:set
 
jQuery in Action, 3rd edition