Re: WO 5.3 and Tomcat property files?
Re: WO 5.3 and Tomcat property files?
- Subject: Re: WO 5.3 and Tomcat property files?
- From: David Aspinall <email@hidden>
- Date: Fri, 19 May 2006 11:41:14 -0400
I encountered problems with WebSphere using properties files. The
first problem is that either the Framework properties files were NOT
read, or they were not read in time (for me to initialize from
them). The second is that when the properties are loaded, there is
only ONE System.properties object. See:
http://www.google.com/search?q=webobjects+servlet+properties
http://developer.apple.com/documentation/WebObjects/JSP_and_Servlets/
SpecialIssues/chapter_4_section_2.html
Additionally you can set properties in the container and WO will load
them from JNDI. Which is cool in a way and familiar for clients with
their own administration processes and policies.
Our solution is to have one property defined in the container to
identify an additional properties file. That file we manually read
(from filesystem/war/ear) using a standard java Properties object and
then for each property we set the key and value into NSProperties.
If we do this early enough (Application initialization) then we can
control/override all the standard WebObjects properties (including
custom jdbc/jndi connection info).
Hope this helps,
David
On 19-May-06, at 2:39 AM, Dave Elsner wrote:
Hi,
What the best approach to use property files from development in
and for deployment within tomcat? Because it seems they are not
being read in at run time
System.getProperty("foo") always returns null under tomcat, but
works perfectly in development in Xcode.
I tried printing out System.getProperties() and none of my
application properties have been loaded only the built in Java ones
are there.
How does every one else handle this?
1) Manually add properties as <env-entry> in the web.xml file?
2) Avoid properties altogether ?
3) Something else?
I had a quick look at LEConfigServletEnvEntryMergeTool from
lejstuff from Andrew Lindesay and it looks promising. As it appears
to convert property files to <env-entry> in the web.xml file, but
running it out of the box I got IO.exceptions.
- Dave
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40ticoon.com
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden