File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Servlets and the fly likes Add parameter in Header Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Add parameter in Header" Watch "Add parameter in Header" New topic

Add parameter in Header

Luiz Pereira

Joined: Mar 18, 2004
Posts: 6
How can I add parameter in header request and use request.getHeader() ?
I know request.getParameter but a need this parameter in header.

[ May 26, 2004: Message edited by: Luiz Pereira ]
Mike Nightsky
Ranch Hand

Joined: Aug 18, 2001
Posts: 48
you mean in response.
just type response.setHeader(name, value);
and you have it in the header.
to get it back from the incomming request type:
String value = request.getHeader(name);
thats all.


Win the opportunity to make money on the Internet<br /><a href="" target="_blank" rel="nofollow"></a>
I agree. Here's the link:
subject: Add parameter in Header
jQuery in Action, 3rd edition