Forums Register Login

Attribute In Page Scope Doubt !!!

+Pie Number of slices to send: Send
Q-3 How will i set an attribute in page scope and access it using EL?
Code please...
+Pie Number of slices to send: Send
You cannot set attributes using EL only. You'll have to use either scriptlets or JSTL. You can read page scope attributes using either ${name} or ${pageScope.name}.
+Pie Number of slices to send: Send
<c:set var="name" value="sandeep" scope="page" />

${pageScope.name}
+Pie Number of slices to send: Send

This is JSTL, not EL. There's no ${name=sandeep}.
+Pie Number of slices to send: Send
 

<c:set var="name" value="sandeep" scope="page" />



This is JSTL..
Does this tiny ad smell okay to you?
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 929 times.
Similar Threads
doubt about useBean
c:set using var
HFSJ - Doubt
Is pageContext.setAttribute() Thread-safe?
page scope
More...

All times above are in ranch (not your local) time.
The current ranch time is
Apr 16, 2024 10:25:36.