S
Sigi
Hi,
I have a servlet which is called by a POST from a form in a html page.
Inside this servlet, through the "request.getRequestDispatcher", I open a
page foo.html in the same path of the servlet.
protected void doPost(HttpServletRequest request, HttpServletResponse
response) throws ServletException, IOException {
// some code...
request.getRequestDispatcher("foo.html").forward(request, response);
}
Instead, if I try to write an absolute URL (i.e., if I want to call a page
on another site):
request.getRequestDispatcher("http://www.abcde.com/foo.html").forward(request,
response);
it doesn't work:
The requested resource (/myproject/http://www.abcde.com/foo.html) is not
available.
So it seems that it can accepts only relative URLs.
How can I open an absolute URL?
Thanks.
I have a servlet which is called by a POST from a form in a html page.
Inside this servlet, through the "request.getRequestDispatcher", I open a
page foo.html in the same path of the servlet.
protected void doPost(HttpServletRequest request, HttpServletResponse
response) throws ServletException, IOException {
// some code...
request.getRequestDispatcher("foo.html").forward(request, response);
}
Instead, if I try to write an absolute URL (i.e., if I want to call a page
on another site):
request.getRequestDispatcher("http://www.abcde.com/foo.html").forward(request,
response);
it doesn't work:
The requested resource (/myproject/http://www.abcde.com/foo.html) is not
available.
So it seems that it can accepts only relative URLs.
How can I open an absolute URL?
Thanks.