Can InitialDirContext read from a file?

L

laredotornado

Hi,

Just as a Properties file is able to load in properties via an
InputStream, I was wondering if InitialDirContext could load up
environment entries from an XML file, specifically, one where the
properties are stored like so ...

<env-entry>
<env-entry-
name>myco.galc.capitol.tours.email.notification.subject</env-entry-
name>
<env-entry-type>java.lang.String</env-entry-type>
<env-entry-value>%s Capitol Tour Request</env-entry-value>
</env-entry>

I couldn't find anything in the API so wondered if there was a more
creative way to do it. Thanks, - Dave
 
J

John B. Matthews

laredotornado said:
Just as a Properties file is able to load in properties via an
InputStream, I was wondering if InitialDirContext could load up
environment entries from an XML file, specifically, one where the
properties are stored like so ...

<env-entry>
<env-entry-
name>myco.galc.capitol.tours.email.notification.subject</env-entry-
name>
<env-entry-type>java.lang.String</env-entry-type>
<env-entry-value>%s Capitol Tour Request</env-entry-value>
</env-entry>

I couldn't find anything in the API so wondered if there was a more
creative way to do it. Thanks, - Dave

Would those differ from the ones determined by InitialContext?

<http://java.sun.com/javase/6/docs/api/javax/naming/InitialContext.html>

Just curious.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top