Hi all

I have developed some web applications using MS Active Server Pages, but
lately decided to try out JSP too. Here comes my question: in ASP you have a
file called "global.asa", where you have Session_onStart and -onEnd and the
same with Application. I discovered somehow, that JSP should use a VERY
similar (has Sun been inspired by MS?) file called "global.jsa" with the
exactly the same methods, only in JSP. Here's what I then try to do to
instantiate a Session variable like in ASP in global.jsa:

<jsp:application:onStart>
</jsp:application:onStart>

<jsp:application:onEnd>
</jsp:application:onEnd>

<jsp:session:onStart>
request.getSession(true).putValue("Test", "Hello" );
</jsp:session:onStart>

<jsp:session:onEnd>
</jsp:session:onEnd>

The problem is, that when I after this try to get the value on another page
like this:

<%
out.print(request.getSession(true).getValue("Test"));
%>

I just get "null". Seems like global.jsa is never executed. Can anybody give
med some advice on this file? I'm using Java Web Server 2.0 on Windows NT.

Thanks in advance!

Jacob

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
FAQs on JSP can be found at:
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html

Reply via email to