Yes jspInit() is called everytime.. I tried it.
U can write a simple program in which print something in jspInit() routine.
You will c every time u load a page ... code withing jspInit() gets executed
every time.
Nitin
> -----Original Message-----
> From: Kevin Duffey [SMTP:[EMAIL PROTECTED]]
> Sent: Thursday, May 04, 2000 11:23 PM
> To: [EMAIL PROTECTED]
> Subject: Re: JSP Disadvantage ??
>
> I believe if you look at the source, the JSP page extends the JSPServlet
> or
> whatever the specific JSP engine has for it. That servlet probably has the
> init() method in it already..so infact it would only be called once. The
> JSPInit method I am not sure why it is called every time, but I don't
> think
> it creates a new object every time.
>
>
> > -----Original Message-----
> > From: A mailing list about Java Server Pages specification and reference
> > [mailto:[EMAIL PROTECTED]]On Behalf Of Gogia Nitin
> > Sent: Thursday, May 04, 2000 5:04 AM
> > To: [EMAIL PROTECTED]
> > Subject: Re: JSP Disadvantage ??
> >
> >
> > Hi Ritesh,
> >
> > I know that JSP compiles into a servlet and that servlet is called.
> > But since i read it and i have one point because of which i was in
> doubt.
> > The point is if i create jspInit() routine in the JSP declaration
> >
> > <%!
> > public void jspInit()
> > {
> > // Your Code
> > }
> > %>
> >
> > The code in jspInit() gets executed everytime i load a JSP Page whereas
> in
> > servlets
> > the init routine is executed only once when the servlet is loaded first
> > time.
> > Any subsequent requests to servlet page won't execute init routine....
> >
> > Please Clarify...
> >
> > Nitin
> >
> > > -----Original Message-----
> > > From: Ritesh Sinha [SMTP:[EMAIL PROTECTED]]
> > > Sent: Thursday, May 04, 2000 2:13 PM
> > > To: [EMAIL PROTECTED]
> > > Subject: Re: JSP Disadvantage ??
> > >
> > > Hi Nitin,
> > > I think you have to go to a little depth of JSP. Its not that JSP is
> > > loaded
> > > every time it is requested.
> > > A JSP when compiled for the first time, is converted to "SERVLET" . So
> > > that
> > > ways there is no difference between a JSP and a servlet. this servlet
> is
> > > then compiled and use as any other normal servlet. The
> > performance dip is
> > > encountered only for the first time. Then onwards any JSP is
> > jsut like any
> > > servlet.
> > > If you are using jswdk... then just check the folder "work" you'll see
> > > servlets corresponding to each of your JSP.
> > > I hope i have been able to clarify on your query,
> > > Any further questions, suggestions are welcome.
> > > Ritesh Sinha
> > >
> > >
> > >
> > >
> > >
> > > Gogia Nitin <[EMAIL PROTECTED]> on 05/04/2000 01:35:03 PM
> > >
> > > Please respond to A mailing list about Java Server Pages
> > specification and
> > > reference <[EMAIL PROTECTED]>
> > >
> > > To: [EMAIL PROTECTED]
> > > cc: (bcc: Sinha Ritesh-SWD-ITIL-UB/Itilmail)
> > >
> > > Subject: JSP Disadvantage ??
> > >
> > >
> > >
> > >
> > > I read that everytime user requests for a JSP page , a seperate
> > object is
> > > created and loaded into memory. Is it true ?
> > > If yes, then this the biggest disadvantage as compared to servlets
> which
> > > is
> > > loaded into memory only once and for every request from user spwans a
> > > seperate thread.
> > >
> > > Nitin
> > >
> > >
> >
> ==========================================================================
> > > =
> > > 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
> >
>
> ==========================================================================
> =
> 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