jQuery in Action, 3rd edition
The moose likes Servlets and the fly likes problem in request.getHeader() Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Reply locked New topic

problem in request.getHeader()

Arun Prasath
Ranch Hand

Joined: Aug 14, 2006
Posts: 30
i have some problem in using request.getHeader(String)

In a servlet my i set a header.
The code is:


RequestDispatcher rd=request.getRequestDispatcher("index.jsp");

Then i forward it to a jsp page ie,index.jsp

In the index.jsp i get the following result:

String ss=(String)request.getHeader("Arun");

The result i get while print the String is null.I expect the header value
prasath to be printed.
Christophe Verré

Joined: Nov 24, 2005
Posts: 14688

Please do not post the same question twice :

[My Blog]
All roads lead to JavaRanch
I agree. Here's the link: http://aspose.com/file-tools
subject: problem in request.getHeader()
jQuery in Action, 3rd edition