Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > Can InitialDirContext read from a file?

Reply
Thread Tools

Can InitialDirContext read from a file?

 
 
laredotornado
Guest
Posts: n/a
 
      11-30-2009
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.su bject</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
 
Reply With Quote
 
 
 
 
John B. Matthews
Guest
Posts: n/a
 
      11-30-2009
In article
<(E-Mail Removed)>,
laredotornado <(E-Mail Removed)> wrote:

> 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.su bject</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.

--
John B. Matthews
trashgod at gmail dot com
<http://sites.google.com/site/drjohnbmatthews>
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Binary data stored in SQL Server: can't read from ASP.NET, *can* read from Access? Doug ASP .Net 3 11-04-2005 07:35 PM
open and read functions (can't make 'read' work..) ferbar C Programming 9 09-25-2005 07:52 AM
Re: Unable to read video DVDs and can read Data DVDs Biz DVD Video 0 07-22-2005 03:44 AM
Can not delete file: Can not read from source file or disk. Pundit Computer Support 0 02-28-2005 03:27 AM
my outlook express 5 can not send mail I get a message can not read your smpt. Veteran Computer Support 1 05-02-2004 02:49 AM



Advertisments