How can I access external folder content from my application? - Websphere
This is a discussion on How can I access external folder content from my application? - Websphere ; Hi all,
the configuration data for my application are in a seperate folder on the file system.
How can I access it? I created an url provider in the administrative console. The jndi name is url/testUrl and this is my ...
-
How can I access external folder content from my application?
Hi all,
the configuration data for my application are in a seperate folder on the file system.
How can I access it? I created an url provider in the administrative console. The jndi name is url/testUrl and this is my java code:
Context env = (Context) ctx.lookup("java:comp/env");
URL url = (URL) env.lookup("url/testUrl");
I got this error:
NamingException: Name url not found in context "java:comp/env".
I tried the url provider on node and on server level.
Do I have to configure something else?
I use the WID 6.0.2.
BTW.. is an url provider the right kind of provider?
Thanks, Susanne
-
Re: How can I access external folder content from my application?
On Apr 20, 4:16 am, wrote:
> Hi all,
>
> the configuration data for my application are in a seperate folder on the file system.
> How can I access it? I created an url provider in the administrative console. The jndi name is url/testUrl and this is my java code:
>
> Context env = (Context) ctx.lookup("java:comp/env");
> URL url = (URL) env.lookup("url/testUrl");
>
> I got this error:
> NamingException: Name url not found in context "java:comp/env".
>
> I tried the url provider on node and on server level.
> Do I have to configure something else?
> I use the WID 6.0.2.
> BTW.. is an url provider the right kind of provider?
>
> Thanks, Susanne
Hi Susanne,
I've created a detaile and (I hope clear) tech note to answer your
question. I've also included sample code for creating a url resource
and performing a jndi lookup of the url resource. Please let me know
if I can provide further assistance.
I've posted the information to:
http://bronzedrum.com/Forums/viewtopic.php?id=10
Hope this helps.
Best Regards,
Brian