Win a copy of Testing JavaScript Applications this week in the HTML Pages with CSS and JavaScript forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

Reload Struts property file

 
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
Is it possible to reload struts property file dynamically without restarting application or server.


Thanks in Advance.
Manju
 
Ranch Hand
Posts: 41
Eclipse IDE Firefox Browser Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No, that's not possible. You'll have to restart the server everytime you make a change as is the case with web.xml or struts-config.xml.
 
Ranch Hand
Posts: 485
Eclipse IDE Firefox Browser Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It is possible in struts 2 but it should be in development mode.

http://struts.apache.org/2.0.11/docs/devmode.html
 
Orton K Randy
Ranch Hand
Posts: 41
Eclipse IDE Firefox Browser Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ah yes, bad I forgot that. Tthe catch is that, resource bundles and struts-config will be reloaded for EVERY user request imposing a huge performance penalty. But then, for development, it's actually cool feature since we don't literally care about performance in the dev phase.
 
Mohana Rao Sv
Ranch Hand
Posts: 485
Eclipse IDE Firefox Browser Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
FYI, It's not going to reload for each any every request Until and unless there is any modification in the resource bundle or struts.xml file. Internally it stores file modification details.
 
Orton K Randy
Ranch Hand
Posts: 41
Eclipse IDE Firefox Browser Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Mohana Rao wrote:FYI, It's not going to reload for each any every request Until and unless there is any modification in the resource bundle or struts.xml file. Internally it stores file modification details.



You sure of that? I haven't tried that, but the spec NOWHERE mentions like the resources are reloaded only if a modification is done to any of the resources. Not that it matters much to me, but still, wanted to know if that's the case.
 
Mohana Rao Sv
Ranch Hand
Posts: 485
Eclipse IDE Firefox Browser Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You sure of that? I haven't tried that, but the spec NOWHERE mentions like the resources are reloaded

Proof is here.








 
Create symphonies in seed and soil. For this tiny ad:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
    Bookmark Topic Watch Topic
  • New Topic