• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Reload Struts property file

 
Manju Na
Greenhorn
Posts: 11
  • 0
  • 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
 
Orton K Randy
Ranch Hand
Posts: 41
Eclipse IDE Firefox Browser Tomcat Server
  • 0
  • 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.
 
Mohana Rao Sv
Ranch Hand
Posts: 485
Eclipse IDE Firefox Browser Linux
  • 0
  • 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
  • 0
  • 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
  • 0
  • 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
  • 0
  • 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
  • 0
  • 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.








 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic