A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Joined: Jun 28, 2005
Jun 29, 2005 01:25:00
How does the application object(
context) is accessed from any where
in the web application? what is the role of application.getAttribute(" ") method in this?
Joined: May 31, 2004
Jun 29, 2005 02:28:00
Application container can be accessed in this fashion
context = getServletContext();
is your application object.
You can use the following line of code to store any object at the application level:
Now if you want to retrieve the object from the application scope you can use the following line of code:
MyApplicationObject myApplicationObject = (MyApplicationObject) context.getAttribute("myObject");
It is sorta covered in the
JavaRanch Style Guide
Deploy Java Application On Customer Side?
single threaded or multi threaded
adding tomcat 6.0 error
Tech Word Game
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2015