Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Can we reload property file?

 
Zaid Ansari
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
if i use using JSTL setBundle tag like
<fmt:setBundle basename="Application" var="loadedBundle" scope="application"/>
than is there any way i can reload my Application.properties file at runtime
Actually i want to reload my bundle when i update my property file from my admin section. File is updated but bundle returns old values.
even if i remove that variable using
<c:remove var="loadedBundle" scope="application"> and than try to reload the bundle it return the old values.
Anybody know any solution.....
Zaid
[ August 17, 2007: Message edited by: Bear Bibeault ]
 
Zaid Ansari
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Finally i got a solution that resolved my problem. it's here for other who might need this.
If you are using Tomcat than you will need clearTomcatCache method otherwise clearMap(ResourceBundle.class, null, "cacheList"); is enough.
Also make sure that in server.xml the application you are using should not have reloadable="true", if it's there change it to reloadable="false".

Zaid Ansari

code:




[BSouther: Added UBB CODE tags]
[ August 24, 2007: Message edited by: Ben Souther ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic