Meaningless Drivel is fun!
The moose likes JSP and the fly likes JSTL formatting issue Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "JSTL formatting issue" Watch "JSTL formatting issue" New topic

JSTL formatting issue

Faisal Khan
Ranch Hand

Joined: Jun 29, 2003
Posts: 285
I have a JSP page which uses a bean to retrieve some prices and these prices are formatted as a currency using the JSTL formatNumber:

This works fine on my local machine for as many times I call the page. However, when I uploed the very same page to the server, it always displays the same value for all double entries. Say, if the salary entered was 50000 the first time, it always sticks to that value (for all prices) until the app / tomcat is restarted.
Can someone point out my error?
Note: I need the page to take part in the session as only validated users should be accessing the page.
Thanks in advance
- FK -

The secret to creativity is knowing how to hide your sources.
Jeroen Wenting
Ranch Hand

Joined: Oct 12, 2000
Posts: 5093
I don't think your code is in error.
What is far more likely is that someone, somewhere, is caching the first response and giving you that whenever you request the page.
Set the page to expire immediately at all levels (metatags, HTTP headers, and is you can server configuration).
It's no guarantee but better than nothing.

I agree. Here's the link:
subject: JSTL formatting issue
It's not a secret anymore!