Well, I figured out the answer to my second question (accessing the vars set
in JRUN mgmt console).  These values must be accessed with the
getInitParameter method apparently.  I am still trying to figure out the
global.jsa thing though.

This all brings me to a conceptual question.  When one desires to set
initial values for application-scope variables, what is the best approach.
Coming from ASP, I tend to favor the global.jsa approach since it mirrors
the global.asa so directly. Setting values for variables directly within the
management console is cleaner though.  I am sure there are a multitude of
other options as well.  Does anyone have any opinions on the best approach
in this regard?

Thanks.
Neal


-----Original Message-----
From: A mailing list about Java Server Pages specification and reference
[mailto:[EMAIL PROTECTED]]On Behalf Of Neal Cabage
Sent: Sunday, August 20, 2000 6:53 PM
To: [EMAIL PROTECTED]
Subject: [JSP-INTEREST] RE : JRUN : global.jsa


I am attempting to use the global.jsa file for JRUN, in order to localize my
settings.  ...But it's not working.  Could someone please take a look and
tell me what I am missing.  I can't find *ANY* documentation or examples
outside of the 1 page that covers the topic in the JRun manual.

Here's the global.jsa file:

<%! public void applicationInit() {
        String myStr = new String("hello world!");
        application.setAttribute("testVar",myStr );
}%>

<%! public void applicationDestroy() {
        System.out.println("The intranet is temporarily not available.");
}%>

Here's the error that I am recieving:
Could not instantiate jrun__global2ejsab
java.lang.NullPointerException
...
and then it gives the whole stack dump.

Any thoughts?

Also, I have tried setting application variables through the interface of
JRUN as it would seem to provide the opportunity to do, but (while I don't
get an error) I can't actually access these values.

Thanks in advance for your thoughts.
Neal

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

Reply via email to