File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Struts and the fly likes Struts 2 Load property file on startup Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Struts 2 Load property file on startup" Watch "Struts 2 Load property file on startup" New topic

Struts 2 Load property file on startup

Pravin Sundar

Joined: Jun 14, 2013
Posts: 1
Hello, I am working on a web-application that runs on JBOSS 5.1. The application is built on STRUTS2 framework & it has its own application properties file (with WS end point urls, server ports etc). I would like to load this property file in JBOSS during startup so that i can access it in my application using JNDI. I googled a bit & came to know about properties-service.xml. Is it a good practice or is there other better solutions?
Joe Ess

Joined: Oct 29, 2001
Posts: 8839

Have a look at this post

"blabbing like a narcissistic fool with a superiority complex" ~ N.A.
[How To Ask Questions On JavaRanch]
I agree. Here's the link:
subject: Struts 2 Load property file on startup
Similar Threads
Web Application Design - Config files best locations - Dynamic/Static - JBoss AS 7
loading modified properties file automatically
Loading the Properties file in a Web Application
Jboss log4j configuration
Custom system properties for each struts application