Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

ServletContext returns NULL  RSS feed

Dakshinamurthy Ramachandran
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
We deployed our application in iPlanet 6.0 on Solaris.
Our report links are routed thru one "intermediate" jsp file for getting the configuration values.
Configuration values are read and kept in application scope in first time invocation of any report, using
application.setAttribute("reports_properties", properties);
and subsequent call to reports will take the config values from application object.
Application is working fine for past one month and the following exception thrown a day back.
nown Source)
at jsp.APPS.maps.common.intermediate._jspService(

The following is the coding snippet used in the "intermediate" jsp file.

if(application.getAttribute("reports_properties") == null)
/* Get Values from file */
properties = new Properties();
FileInputStream file = new FileInputStream("/");
application.setAttribute("reports_properties", properties);
readTheProperty = true;
/* Get Values from session object */
properties = (Properties) application.getAttribute("reports_properties");

Please clarify me by any chance "application" object
(ie) application = pageContext.getServletContext();
can be NULL.
Thanks in advance
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!