wood burning stoves 2.0*
The moose likes Servlets and the fly likes Can we access servlets using JNDI? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "Can we access servlets using JNDI?" Watch "Can we access servlets using JNDI?" New topic
Author

Can we access servlets using JNDI?

Laxmi Raghu
Ranch Hand

Joined: Feb 16, 2005
Posts: 218
Can we access servlets using JNDI? Pls help.
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

Laxmi R,

We're pleased to have you here with us in the servlets forum, but there are a few rules that need to be followed, and one is that proper names are required. Please take a look at the JavaRanch Naming Policy and adjust your display name to match it.

In particular, your display name must be a first and a last name separated by a space character, and must not be obviously fictitious.

You can change it here


Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41108
    
  45
JNDI generally returns an object of some kind that you can use for some specific purpose, e.g. a database connection, an reference to an EJB, or a local stub for an object accessible through RMI. But servlets are accessed remotely, and have no concept of a local stub. What exactly are you trying to do?
[ January 14, 2006: Message edited by: Ulf Dittmer ]

Ping & DNS - my free Android networking tools app
dema rogatkin
Ranch Hand

Joined: Oct 09, 2002
Posts: 294
Actually it's interesting idea. I build servlets repository in my servlet container, but it looks like I can use JNDI for that purpose. Thank you for giving so bright idea.


Tough in space?, <a href="http://tjws.sf.net" target="_blank" rel="nofollow">Get J2EE servlet container under 150Kbytes here</a><br />Love your iPod and want it anywhere?<a href="http://mediachest.sf.net" target="_blank" rel="nofollow">Check it here.</a><br /><a href="http://7bee.j2ee.us/book/Generics%20in%20JDK%201.5.html" target="_blank" rel="nofollow">Curious about generic in Java?</a><br /><a href="http://7bee.j2ee.us/bee/index-bee.html" target="_blank" rel="nofollow">Hate ant? Use bee.</a><br /><a href="http://7bee.j2ee.us/addressbook/" target="_blank" rel="nofollow">Need contacts anywhere?</a><br /><a href="http://searchdir.sourceforge.net/" target="_blank" rel="nofollow">How to promote your business with a search engine</a>
 
 
subject: Can we access servlets using JNDI?
 
Similar Threads
JNDI- Ejb Home
Convert DataSource to otherdatasource
can we use same port for ejb and serlet
JNDI basics
Using DI in Client