• Post Reply Bookmark Topic Watch Topic
  • New Topic

pass parameter from jstl to expression tag  RSS feed

 
vivek dhiman
Ranch Hand
Posts: 155
Netbeans IDE Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I have a variable , I want to pass var1 as <%= new customclass().method1(var1) %>

Any Idea what is the syntax to pass this value.

Thanks
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 66208
151
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Why are you mixing scriptlets into JSTL? That's just a big mess. What are you actually trying to accomplish?
 
vivek dhiman
Ranch Hand
Posts: 155
Netbeans IDE Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am able to get this variable using pageContext object. Thanks
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 66208
151
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yeah, but really. Give some thought to the mess you are likely making by using scriptlets.
 
Stefan Evans
Bartender
Posts: 1836
10
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you have a relatively modern container which supports the Servlet 3 spec and EL2.2 (Tomcat7+) then you are able to invoke methods from EL.


 
vivek dhiman
Ranch Hand
Posts: 155
Netbeans IDE Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks, Applied this approach.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!