It is not possible.
You have to use response.sendRedirect
Or you have to download the page from other server by (new
URL("othersite")).getInputStream()


-----Original Message-----
From: A mailing list about Java Server Pages specification and reference
[mailto:[EMAIL PROTECTED]]On Behalf Of Sushil Singh
Sent: Monday, September 18, 2000 9:21 PM
To: [EMAIL PROTECTED]
Subject: ServletRequest.getRequestDispatcher()


Hi,
I am unable to compile my servlet which is using
ServletRequest.getRequestDispatcher(), its giving error that no such
method. I am having JVM 1.1.7
If I use ServletContext.getRequestDispatcher(), its compiling and
executing but I can not use this methid as I have to specify the full
url in forward() method as my servlet is on some other server. And the
specification shows that ServletContext.getRequestDispatcher() takes
only absolute path (i.e. the url must start with /).

RequestDispatcher rd = null;
rd = req.getRequestDispatcher("http://hostname/servlet/Testservlet");
rd.forward(req, res);

Also if anybody can tell whether its possible to forward a request to a
servlet/jsp which is residing on some other server (i.e. different
domain). This is the reason why I have to specify the full url.

Thanks in advance.

Sushil

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

Reply via email to