This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
The moose likes JSP and the fly likes Passing values between JSTL and scriptlet Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

JavaRanch » Java Forums » Java » JSP
Bookmark "Passing values between JSTL and scriptlet" Watch "Passing values between JSTL and scriptlet" New topic

Passing values between JSTL and scriptlet

Chase Bonham
Ranch Hand

Joined: Jul 15, 2006
Posts: 50
I know I can do pass a scriptlet value to a JSTL tag

<c:set var="".. value ="<%= %>" />

But can I reference an EL/JSTL value inside a scriptlet tag?
Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 63208

First point: you really shouldn't be mixing and matching technologies if you can avoid it. Use scriptlets or use JSTL/EL. Using both is rather messy.

Given that: scoped variables -- those created and referenced via JSTL and EL -- are just what we previously thought of as "attributes" created and obtained via setAttribute() and getAttribute().

[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Have you checked out Aspose?
subject: Passing values between JSTL and scriptlet
It's not a secret anymore!