| Author |
Regarding request/response header processing
|
Dinesh Sarkar
Greenhorn
Joined: Aug 25, 2009
Posts: 2
|
|
Hi, I am working in a project where I have been asked to either add some new headers in request(HttpServletRequest) or set new headers in response and then in some other resource fetch the newly set header values.
Can anybody please suggest ?
Many Thanks in advance .
Dinesh
|
 |
Bosun Bello
Ranch Hand
Joined: Nov 06, 2000
Posts: 1506
|
|
|
You cannot modify the request headers coming into you from the client (browser). However, you can modify and add headers in the response object.
|
Bosun (SCJP, SCWCD)
So much trouble in the world -- Bob Marley
|
 |
Seetharaman Venkatasamy
Ranch Hand
Joined: Jan 28, 2008
Posts: 5575
|
|
welcome to javaranch dinesh
|
 |
Dinesh Sarkar
Greenhorn
Joined: Aug 25, 2009
Posts: 2
|
|
|
Thanks Bosun. Actually my idea was like that.
|
 |
William Brogden
Author and all-around good cowpoke
Rancher
Joined: Mar 22, 2000
Posts: 12271
|
|
Take a look at the HttpServletRequestWrapper and Filter interfaces.
You can use a Filter to substitute a wrapped request to give the effect of modified request headers.
Bill
|
Java Resources at www.wbrogden.com
|
 |
 |
|
|
subject: Regarding request/response header processing
|
|
|