File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Servlets and the fly likes Adding the Parameter in HTTP Request Header Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Adding the Parameter in HTTP Request Header" Watch "Adding the Parameter in HTTP Request Header" New topic
Author

Adding the Parameter in HTTP Request Header

saravanan kanda swamy
Ranch Hand

Joined: Apr 21, 2004
Posts: 33
Hi,

I have a problem like this. How to add a parameter in HTTP Header which goes along with the request.

There are no methods available to set the Header values in the HttpServletRequest object. We can set only the Header values in the HttpServletResponse Object.

Please help me how to solve this.

Thanks in advance

Saravanan.K
Vishnu Prakash
Ranch Hand

Joined: Nov 15, 2004
Posts: 1026

I have a problem like this. How to add a parameter in HTTP Header which goes along with the request


Why do you want to add headers in request object?


Servlet Spec 2.4/ Jsp Spec 2.0/ JSTL Spec 1.1 - JSTL Tag Documentation
saravanan kanda swamy
Ranch Hand

Joined: Apr 21, 2004
Posts: 33
Hi,


I need to add because my requirement is like that acutally the application is depolyed like this.

Another Appliation --> My Application

The Another Application will send a request to my application in that i need to add the parameter in the HTTP Header

Thanks and Regards,
Saravanan.K
Vishnu Prakash
Ranch Hand

Joined: Nov 15, 2004
Posts: 1026

The Another Application will send a request to my application in that i need to add the parameter in the HTTP Header


can't you use attributes here?

Check out this thread.
Anupam Sinha
Ranch Hand

Joined: Apr 13, 2003
Posts: 1088
I guess you wanna recreate a test environment. I used Jakarta cactus for the same in case you need help regarding the same PM me. You may also like going through the help of cactus which explains in greta detail about all this.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: Adding the Parameter in HTTP Request Header