Olivier Brand wrote:

> Is there a way to reference "this" in JSP.
> I know that getServletContext().... is working in JSP, but how can I
> retrieve the servlet implementation from JSP ?

Use the page implicit object, which returns a reference to the servlet
generated by the JSP page (ie: this).

<%! public void methodDecl(){} // declare a class method %>
<%
page.methodDecl(); // this.methodDecl();
// and
methodDecl();
// are equivalent.
%>
--
Michael Hu, Paradox Team, Corel Corporation

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