This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
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


JavaRanch » Java Forums » Java » Servlets
Bookmark "Add parameter in Header" Watch "Add parameter in Header" New topic
Author

Add parameter in Header

Luiz Pereira
Greenhorn

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.

thanks
[ 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.

Mike


Win the opportunity to make money on the Internet<br /><a href="http://sweeps.sitesell.com/minirich.html" target="_blank" rel="nofollow">http://sweeps.sitesell.com/minirich.html</a>
 
Have you checked out Aspose?
 
subject: Add parameter in Header
 
It's not a secret anymore!