wood burning stoves 2.0*
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


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "Passing values between JSTL and scriptlet" Watch "Passing values between JSTL and scriptlet" New topic
Author

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
Marshal

Joined: Jan 10, 2002
Posts: 61106
    
  66

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]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Passing values between JSTL and scriptlet