File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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 Java Interview Guide this week in the Jobs Discussion forum!
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
jQuery in Action, 3rd edition