File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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

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

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

Joined: Mar 22, 2005
Posts: 42965
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 ]
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="" target="_blank" rel="nofollow">Get J2EE servlet container under 150Kbytes here</a><br />Love your iPod and want it anywhere?<a href="" target="_blank" rel="nofollow">Check it here.</a><br /><a href="" target="_blank" rel="nofollow">Curious about generic in Java?</a><br /><a href="" target="_blank" rel="nofollow">Hate ant? Use bee.</a><br /><a href="" target="_blank" rel="nofollow">Need contacts anywhere?</a><br /><a href="" target="_blank" rel="nofollow">How to promote your business with a search engine</a>
I agree. Here's the link:
subject: Can we access servlets using JNDI?
It's not a secret anymore!