Olivier Brand wrote:

> I have acknowledged 2 methods to call JSP from another one:
>
> The first one is by using the include statement
> The other one is by calling :
> getServletContext()getRequestDispatcher(<URI>).include(request,
> response)
>
> What are the diffrences between both methods ?
> Which one is better ?
>

If you are using Java as your scripting language, there is almost no difference
(other than the syntax) between <jsp:include> and using a
RequestDispatcher.include() call.  The former, however, will still be valid even
if you are using another scripting language in a JSP implementation that supports
this.

> Another kind of related question:
>
> In a JSP we can call getServletContext()....
>
> I have tried to use "this" in the JSP to reference the implementation
> but it doesn't seem to work. How do you reference the JSP's servlet ?
>

In what way does it "not work"?  What are you trying to do with it?

Although, I must confess, I can't think of any reason I would ever want to, since
I can reference the variables and methods of the implementation class directly --
and passing a reference to my implementation object to someone else is not a good
idea from a security perspective.

>
> Thanks
>
> Olivier
>

Craig McClanahan

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