Win a copy of Practical SVG this week in the HTML/CSS/JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Getting jstl variable value on run time in jsp.

 
Khushwinder Chahal
Ranch Hand
Posts: 128
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All

I want to get and evaluate the jstl variable in my jsp page. I have the following code:


As you can see in this i am adding 1 to status of the loop.
Now my requirement is i want to add this ${status.index} with some other variable
like
${status.index+1} + <%=variable_name% while displaying that jsp page i.e. on run time.

Any body has any idea.
Thanks you people in advance.
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65545
110
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Mixing JSTL/EL and scriptlets on a JSP page is not a good idea. Choose which one you want to use and use it consistently.
 
Think of how stupid the average person is. And how half of them are stupider than that. But who reads this tiny ad?
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!