aspose 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
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: 60059
    
  65

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: 60059
    
  65

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.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: How to set value in JSTL
 
Similar Threads
How-to use DOM document returned from a bean, with JSTL x:transform
doubt in JSTL set tag
how to overwrite a request param?
Variables from JSTL to JSP
JSTL ternary ?