This week's book giveaway is in the
General Computing
forum.
We're giving away four copies of
Arduino in Action
and have Martin Evans, Joshua Noble, and Jordan Hochenbaum on-line!
See
this thread
for details.
A friendly place for programming greenhorns!
Big Moose Saloon
Search
|
Java FAQ
|
Recent Topics
Register / Login
Win a copy of
Arduino in Action
this week in the
General Computing
forum!
A special promo:
Enter your blog post or vote on a blogger to be featured in an upcoming Journal
JavaRanch
»
Java Forums
»
Java
»
Servlets
Author
problem in request.getHeader()
Arun Prasath
Ranch Hand
Joined: Aug 14, 2006
Posts: 30
posted
Aug 14, 2006 01:14:00
0
--------------------------------------------------------------------------------
i have some problem in using request.getHeader(
String
)
In a
servlet
my i set a header.
The code is:
response.setHeader("Arun","Prasath");
RequestDispatcher
rd=request.getRequestDispatcher("index.jsp");
rd.forward(request,response);
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");
out.println(ss);
The result i get while print the String is null.I expect the header value
prasath to be printed.
Christophe Verré
Sheriff
Joined: Nov 24, 2005
Posts: 14685
16
I like...
posted
Aug 14, 2006 01:31:00
0
Please do not post the same question twice :
http://www.coderanch.com/t/363170/Servlets/java/request-getHeader
[My Blog]
All roads lead to JavaRanch
I agree. Here's the link:
http://ej-technologies/jprofiler
- if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
subject: problem in request.getHeader()
Similar Threads
How did someone get to my site
Problem using setHeader() method
getting the url of original page
problem in using request.getHeader()
Adding headers
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter