A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
The Java EE 7 Tutorial Volume 1 or Volume 2
this week in the
jQuery UI in Action
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
adding tomcat 6.0 error
single threaded or multi threaded
Tech Word Game
Deploy Java Application On Customer Side?
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2014