File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Servlets and the fly likes request.getHeaderNames() Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Make it so: Java DB Connections & Transactions this week in the JDBC forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "request.getHeaderNames()" Watch "request.getHeaderNames()" New topic


auvrm papu
Ranch Hand

Joined: Sep 01, 2005
Posts: 105
Does request.getHeaderNames()get the custom headers also?
Ben Souther

Joined: Dec 11, 2004
Posts: 13410

I'm not sure what you mean by "the custom headers".

That method returns an enumeration of all the headers in the request.
If you have a client that creates custom request headers, you should be able to read them just like any other headers.

Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
I agree. Here's the link:
subject: request.getHeaderNames()
It's not a secret anymore!