473,474 Members | 1,324 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Find a resource using JNDI in a Web Application.

dmjpro
2,476 Top Contributor
When i do ....

Expand|Select|Wrap|Line Numbers
  1. HashMap props = new HashMap();
  2. props.put(Context.INITIAL_CONTEXT_FACTORY,"FactoryClass");
  3. Context ctx = new InitialContext(props);
  4.  
Here it is obvious that the proper factory class is given.
But when it is not given then what happens?
From where the context obtained?

Now in Web Application we define the resources in context.xml(for tomcat).
So to obtain a context we simply call the zero argument constructor and then simply by lookup service we get the resources bound to names. So here how the Context service provider obtained without setting the properties value.
Jun 12 '09 #1
0 1469

Sign in to post your reply or Sign up for a free account.

Similar topics

12
by: bj7lewis | last post by:
I am working on a project I want to add a few files as resource to access(copy them to FS and use) at runtime. So far in VS.NET IDE, I Add Files to the project and set its Build Action to...
11
by: Alan T | last post by:
I added a resource file into my project, to store the caption of buttons and labels.. How do I make use of this resource file to dynamically assign to the buttons and labels ?
5
by: Pallavi Kadam | last post by:
Tell Me Fullform of Jndl Tellme Jndi Is Releated To Topics Jndi Imp role In j2ee
1
dmjpro
by: dmjpro | last post by:
how do i do JNDI program in local machine.... plze give me JNDI programming free tutorial with examples .... plz help me .... thanx
0
by: sajithamol | last post by:
<env-entry> <env-entry-name>com/speedRate</env-entry-name> <env-entry-type>java.lang.Integer<env-entry-type> < env-entry-value>10</env-entry-value> </env-entry>
12
by: TS | last post by:
i have a need to possibly enable mutli language support. What benefit do i get by using a resource file instead of a custom xml solution? thanks!
0
by: choukse | last post by:
Hi All, I am trying to bind to ADAM instance with a windows user through JNDI and it keeps failing. My ADAM and AD is running on same Windows 2k3 server. But, through LDP I am able to bind with...
9
dmjpro
by: dmjpro | last post by:
I thought that when the connection gets closed then all resources get closed . I also included the ResultSet and Statement ;) . But if the Statement closed then only ResultSet closed. But now i got...
1
vitmca
by: vitmca | last post by:
How to configure jndi name in Jboss. I am using sql server 2005.
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.