Solved

Response headers

Posted on 2004-04-27
1
208 Views
Last Modified: 2010-04-01
Is there any way to read response header names and their values as we have in case of request headers ?

Regards,

0
Comment
Question by:allahabad
1 Comment
 
LVL 7

Accepted Solution

by:
mark-b earned 100 total points
ID: 10932610
Nope, not generically (that I know of).  You can check for their existence:

res.containsHeader( header)

but you can't get the values.  One option I can think of is to use the underlining response implementation by the servlet engine (by casting)-- you might be able to get to them that way.  Another option is to create your own implementation of the http servlet response that implements HttpServletResponse and defers to the contained 'real' http servlet response.  In your implementation, the pertinent methods that are around the headers would capture the names and values and then pass them on the contained response.  Just an idea..

-Mark
0

Featured Post

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
logging jar 1 109
report generation frameworks 1 64
SimpleDateFormat.parse examples 19 93
parse example 13 94
Troubleshooting common task sequence error codes
How do we balance the user experience (UX) with reasonable security measures? It can be done, if you keep these fundamentals in mind.
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …

776 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question