Veronique Dupierris wrote:
> Hi,
>
> Just a question : in all (i think) examples, the getRequestDispatcher
> method was call using :
> getServletConfig().getServletContext().getRequestDispatcher(url);
> I saw that we could use :
> request.getRequestDispatcher(url);
>
> Is there any difference ?
The difference is that the URL in the latter case can be relative to this request,
while in the former case it must be relative to the context's document root.
> Why do all examples uses the first which
> is longer ?
>
"Longer" isn't really the issue. I suspect you're seeing the result of the fact
that the first form was introduced in Servlet API 2.1, while the second form was
added in Servlet API 2.2.
>
> Thanks
> Regards
> Veronique
>
Craig McClanahan
===========================================================================
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