• Post Reply Bookmark Topic Watch Topic
  • New Topic

JSTL inside Java Scriptlet

 
Vicky Mohan
Ranch Hand
Posts: 130
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey All,

I was just wondering if we can use JSTL command inside java scriptlet in a JSP ??


<%= testMethod(<c ut value="${form.variable1}"/> %>

Reply will be appreciated.
[ August 18, 2005: Message edited by: Mohen Vijay ]
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65530
108
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No. The EL and JSTL are meant to supplant scriplets.
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65530
108
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you need to process a scoped variable that cannot be processed in the page's controller, I'd employ a custom action (formerly known as a "custom tag") that does what your scriptlet method was intended to do.

Something like:



(Assuming a JSP 2.0 environment)
[ August 18, 2005: Message edited by: Bear Bibeault ]
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!