This week's book giveaway is in the Mac OS forum.
We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line!
See this thread for details.
The moose likes JSP and the fly likes How to set value in JSTL Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » JSP
Bookmark "How to set value in JSTL" Watch "How to set value in JSTL" New topic
Author

How to set value in JSTL

Raj Puri
Ranch Hand

Joined: Apr 24, 2003
Posts: 189
I like to be able to do i=i+100 in JSTL. How this can be accomplished? Tried c:set it did not like expression in value.

<c:set var=i value="${i+100}" />
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61315
    
  66

What is 'i'? Is it already a scoped variable of a numeric type?


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61315
    
  66

The following test page works fine for me. (JSP 2.0)

Raj Puri
Ranch Hand

Joined: Apr 24, 2003
Posts: 189
Thanks worked I had extra curly.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to set value in JSTL