aspose file tools*
The moose likes Servlets and the fly likes Servlet Context / InitialContext Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "Servlet Context / InitialContext" Watch "Servlet Context / InitialContext" New topic
Author

Servlet Context / InitialContext

Ben Roy
Ranch Hand

Joined: Nov 01, 2000
Posts: 70
I don't know much about ServletContext as I have been primarily working with jsp/javabeans/EJB and not really with servlets at all. If anyone knows, is it possible for me to retrieve ServletContext information from InitialContext? Is it part of the same "tree" or are they completely separate and unrelated?
Carl Desborough
Greenhorn

Joined: May 08, 2000
Posts: 22
I dont know of any connection (other than the name) between servlet and initial contexts ...
InitialContext is where you can get register and get access to objects in JNDI.
ServletContext allows a servlet to communicate with its container. Objects can be stored in and retrieved from a ServletContext (set and getAttribute) but i dont think its related to the InitialContext names.
Danny Mui
Ranch Hand

Joined: Dec 14, 2000
Posts: 42
Another point, I believe that ServletContexts can only be retrieved from servlets as well (unless you JNDI the object).
maha anna
Ranch Hand

Joined: Jan 31, 2000
Posts: 1467
Carl,
Are you the famous 100% SCJP from AUS ? Just curious.
regds
maha anna
Carl Desborough
Greenhorn

Joined: May 08, 2000
Posts: 22
famous? no ... but yes i did get 100% in scjp and i am from australia.
Originally posted by maha anna:
Carl,
Are you the famous 100% SCJP from AUS ? Just curious.
regds
maha anna

 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Servlet Context / InitialContext