Hi there,
Yes you can. The corresponding method in JSP is jspInit()
<%public void jspInit(){
        do your work here;
  }
%>
This method is called by JSP container automatically.
Similarly you can use jspDestroy() which is called when the corresponding
servlet class of that jsp is unloaded by the container.

regards
Y
----- Original Message -----
From: Ugur Karakaya <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, July 14, 2000 11:26 PM
Subject: init


> Hi,
>
> How can I use init() method with jsp applications.
> For example in servlet  ,
>
> I connect database only initilazing the servlet (init()) or add elements
to a
> Hashtable only init() method.
>
> and then each time, in post or get method, I can call same value or i
don't connect
> the database.etc.
>
> Thanks.
>
>
===========================================================================
> 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