Skip to Main Content

Java HotSpot Virtual Machine

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Forwarding request from a servlet to a HTML page?

843829May 20 2002 — edited May 20 2002
Dear everyone,

I wish to forward a request from a servlet to to an HTML page. My codes look like this:

RequestDispatcher rd = getServletContext().getRequestDispatcher ("test.html");
rd.forward(req, resp);

This seems to work as long as the HTML file is within the same root as that of the servlet.

I was wondering if there was a way to forward it to an absolute URL? If I can't use getRequestDispatcher() for the URL, is there an alternative for implementing this?

Thanks a lot!
George
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 17 2002
Added on May 20 2002
1 comment
97 views