File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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

Win a copy of Barcodes with iOS this week in the iOS forum
or Core Java for the Impatient in the Java 8 forum!

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:
subject: problem in request.getHeader()