• Post Reply Bookmark Topic Watch Topic
  • New Topic

c:set vs scriplets

 
Kathy Hale
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello from our SCWCD study group!

Any idea what is going on here?

This works:


This works:


But if I mix and match, it fails. For example, what I tried to do when I started:


In case it's relevant, I'm using a public URI:


Thanks!

Kurt & Kathy
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65518
105
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Scriptlets and the EL/JSTL were never meant to work together. Quite the opposite!

The EL has no access to scriptlet variables by design.

The bottom line: scriptlets are a dead technology. Ignore the fact that they even exist.

(Except of course in order to pass an exam. Then forget they exist.)
 
Adeel Ansari
Ranch Hand
Posts: 2874
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Precisely, you need to set your variable now in some context, such as page, in your 3rd example. In fact, your 2nd example is doing the same thing.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!