You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by "LoveJSP.site" <we...@lovejsp.com> on 2000/08/19 09:15:06 UTC
What the function in jsp
ASP JSP
Application_OnStart ??
Application_OnEnd ??
Session_OnEnd
Session_OnStart
thanks in advance
欢迎光临 http://www.lovejsp.com
Re: What the function in jsp (ASP/JSP)
Posted by Eduardo Pelegri--Llopart <Ed...@eng.sun.com>.
Servlet 2.3 contains additional support for applicaiton events, and JSP
1.2 allows for the delivery of event listeners inside tag libraries.
- eduad/o
RE: What the function in jsp (ASP/JSP)
Posted by Luis Andrei Cobo <va...@megapathdsl.net>.
although there are no methods specifically for application_onStart,
Application_onEnd, Session_onStart, and Session_onEnd, those are speicific
subroutines of ASP, you can set session attributes and application
attributes like so:
application attributes:
JSP:
getServletContext().setAttribute("Attribute_name","Attribute_value");
getServletContext().getAttribute("Attribute_name");
ASP:
application.contents("attribute_name") = "attribute_value"
<%= application.contents("attribute_name") %>
Session objects:
JSP:
Session.putValue("Session_Object_Name","Value");
Session.getValue("Session_Object_Name");
ASP
session.contents("Session_object_Name") = "Value"
<%= session.contents("Session_Object_Name") %>
Be careful with datatypes when writing in 'application' objects in JSP,
since its not as simple as ASP to convert datatypes from one to another.
hope this helps
Luis
-----Original Message-----
From: LoveJSP.site [mailto:webmaster@lovejsp.com]
Sent: Saturday, August 19, 2000 3:15 AM
To: tomcat-user@jakarta.apache.org
Subject: What the function in jsp
ASP JSP
Application_OnStart ??
Application_OnEnd ??
Session_OnEnd
Session_OnStart
thanks in advance
欢迎光临 http://www.lovejsp.com