wood burning stoves 2.0*
The moose likes Websphere and the fly likes Loading a properties file external to EAR 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 » Products » Websphere
Bookmark "Loading a properties file external to EAR" Watch "Loading a properties file external to EAR" New topic
Author

Loading a properties file external to EAR

david lightman
Ranch Hand

Joined: Nov 03, 2004
Posts: 82
this seems like a pretty straight task, but just wanted clarification.

I want to have a properties file outside the app/EAR using WSAD/RAD- that loads during was test server startup and so i can simply swap out a file and restart the server again with different params etc, are these normally just placed in the properties directory (although im using WSAD/RSA6/RAD6 in prd we use only was5.1)

can anyone elaborate?

what exactly do i do?
[ January 23, 2006: Message edited by: david lightman ]
david lightman
Ranch Hand

Joined: Nov 03, 2004
Posts: 82
anyone out there know the answer to this?
Jeanne Boyarsky
internet detective
Marshal

Joined: May 26, 2003
Posts: 30138
    
150

David,
You can add any external directory you want to the server's classpath. This can be the WSAD server (in the server perspective) or the real server (in the admin console.)


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
Scott Selikoff
Saloon Keeper

Joined: Oct 23, 2005
Posts: 3703
    
    5

...using Classloader.getResourceAsStream() on a live class loader.


My Blog: Down Home Country Coding with Scott Selikoff
Jawahar varadhan
Greenhorn

Joined: Apr 13, 2006
Posts: 2
How do you do this in Tomcat 4.1 inside RAD? I would like my web-app use a properties file in an external folder. It is easy to do this on WSAD, but not in RAD.
Jeanne Boyarsky
internet detective
Marshal

Joined: May 26, 2003
Posts: 30138
    
150

Jawahar,
In RAD 6, you need to go into the admin console to set this path.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Loading a properties file external to EAR
 
Similar Threads
ear file using WSAD
Is it possible to export ANT build file from WSAD 5.1.1
WSAD and CVS
Where to keep the properties file
Websphere JSP deployment problem