File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JSTL formatting issue

 
Faisal Khan
Ranch Hand
Posts: 285
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
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 -
 
Jeroen Wenting
Ranch Hand
Posts: 5093
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic