| Author |
Redirecting HttpServletRequest to another resource
|
Pradeep Sahoo
Ranch Hand
Joined: Oct 13, 2002
Posts: 46
|
|
Hi folks, I would like to redirect my incoming servlet request to another resource(full URL availabe) outside of my server. My request contains Http Headers as well as some parameters. Can anyone suggest me how to do it? I want the new resource to get all the header as well as parameter information. I am using Weblogic 6.1 ( I guess Servlet 2.2). Thanks,
|
Pradeep<br />Consultant - Enterprise Solutions,<br />Infosys Technologies Ltd,<br />Bangalore, India
|
 |
William Brogden
Author and all-around good cowpoke
Rancher
Joined: Mar 22, 2000
Posts: 12324
|
|
You can't redirect and preserve the parameters because redirect creates a new request. What you can do is have your servlet create a connection to the other resource and fake the request, then just pass the results back as your response. Bill
|
Java Resources at www.wbrogden.com
|
 |
Pradeep Sahoo
Ranch Hand
Joined: Oct 13, 2002
Posts: 46
|
|
Thanks Bill for your answer. If you could explain me with a short code snippet it would be great. Thanks, Pradeep
|
 |
 |
|
|
subject: Redirecting HttpServletRequest to another resource
|
|
|