Antonio Lagnada wrote:
>
> That's tough...is there such a thing as an Application object similar to
> what an Application object would be in ASP?

I didn't write any ASP code, but since I've seen so many questions about
it, now I know what the answer is:)

What you're looking for is called application in JSP or ServletContext
in general. So, if an object should be visible across a web application,
just use the following inside a servlet:

getServletContext().setAttribute("myObject", myobject)

provided myObject is an object to be refered later as myObject. After
doing so, all the following servlets should be able to access "myObject"
object using

MyObject myObject =
(MyObject)getServletContext().getAttribute("myObject");

Jacek Laskowski

===========================================================================
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