• Post Reply Bookmark Topic Watch Topic
  • New Topic

c:set

 
Ranjan Pwar
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 115
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

you can use EL

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


Kathir
 
my overalls have superpowers - they repel people who think fashion is important. Tiny ad:
the new thread boost feature brings a LOT of attention to your favorite threads
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!