But where do you put the java file that implement (jspInit/jspDestroy)
jspPage interface. The _jspService file is produced by compile the jsp
page. can you put jspInit/jspDestroy in the jsp page? If you put in other
directories, do you have to call it explicitly from your jsp page?

JJ

 -----Original Message-----
From: Stephen Summerfield [mailto:[EMAIL PROTECTED]]
Sent: Monday, December 06, 1999 3:48 PM
To: [EMAIL PROTECTED]; Jianjun Fu
Subject: Re: tracking initialization and destruction of JSP objects




> -----Original Message-----
> From: A mailing list about Java Server Pages specification
> and reference
>
> overriding init() and destroy is ok - I have only one question
> 'Is it standard (will it always work ?)' :)
>

Good question - this should answer it, extract from JSP1.0 JavaDocs:

|public abstract interface JspPage
|extends javax.servlet.Servlet
|
|This is the interface that a JSP processor-generated class must satisfy.
|
|The interface defines a protocol with 3 methods; only two of them:
jspInit() and jspDestroy() are part of this
|interface as the signature of the third method: _jspService() depends on
the specific protocol used and cannot
|be expressed in a generic way in Java.
|
|A class implementing this interface is responsible for invoking the
above
methods at the apropriate time based
|on the corresponding Servlet-based method invocations.
|
|The jspInit(0 and jspDestroy() methods can be defined by a JSP author,
but
the _jspService() method is
|defined authomatically by the JSP processor based on the contents of the
JSP page.

So I would say a definite YES, but use the renamed versions defined in
JspPage (jspInit/jspDestroy) interface rather than the normal servlet
ones
(init/destroy) to be safe.

Btw I just learnt something new too :-)

HTH,

Steve

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

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