File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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


Win a copy of Spring in Action this week in the Spring forum!
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: 61413
    
  67

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: 61413
    
  67

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