• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

updating of ResourceBundle not showing

 
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am using ResourceBundles for multilingual support on my site, and all text is in properties-files in the WEB-INF/classes directory.
My problem is that when the files are changed, the change isn't reflected on the page until some page has to be recompiled, and this doesn't necessarily happen after the file has been edited. Is there a way to tell the JSP-server to reload my classes directory when it's been updated?
btw i'm experiencing this on both Tomcat and Resin, newest versions
Thanks
Jesper
 
Ranch Hand
Posts: 152
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Jesper,
The Tomcat 4.0 config docs mention the attribute
"reloadable" on the "Context" element:
"Set to true if you want Catalina to monitor
classes in /WEB-INF/classes/ and /WEB-INF/lib
for changes, and automatically reload the web
application if a change is detected. This
feature is very useful during application
development, but it requires significant
runtime overhead and is not recommended for
use on deployed production applications.
You can use the Manager web application,
however, to trigger reloads of deployed
applications on demand."
So, unless you want every request to check every
file for changes, you're probably better off
1) "touching" the affected JSP when you compile
the new ResourceBundle or edit the properties
file.
2) Or use the Manager webapp to force the reload
yourself.
It's really not that big a deal, since you
presumably have some kind access to the server
to make the changes for your multilingual UI
support.
One note about the "latest" version. Tomcat 4.0.1
includes a new configuration setting in the
server.xml which wasn't in the server.xml with
4.0. The manager webapp uses an attribute "privileged"
in the <CONTEXT> element. This wasn't in 4.0, and
won't be in your server.xml if you upgraded from 4.0
to 4.0.1. If that's the case, you'll get a
SecurityException when you try to run the manager webapp.
Update your server.xml with an entry like
<Context path="/manager" docBase="manager"
debug="0" privileged="true"/>
to solve it. (If you installed 4.0.1 fresh, it should
have the required setting in place. This only affects
installations which allowed the 4.0.1 distribution to
updgrade an existing 4.0 install. Like mine.)
Then the url like
"servername"/manager/reload?path=/examples
should reload the examples, so plug in your app name.
Hope that helps,
Joe
 
reply
    Bookmark Topic Watch Topic
  • New Topic