getHeaderNames

I know the function  getHeaderNames
returns the http headers.
What can be the use of it ?
Thank you.
LVL 9
matthew016Asked:
Who is Participating?
 
leogcCommented:
one of the reasons for finding out browser type and all is that some of our application code may work in some browser and may not work in some browsers.In such cases u have to detect the browser type to put some other logic as work around.In those cases it may be useful.Also u may need to get header parameters when u want to implement some kind of filters.
0
 
leogcCommented:
getHeaderNames() can be used to find out information like what is the request type that is comming like GET or POST,what is the browser the request is comming from,etc.More details can be found from the link below:
http://www.apl.jhu.edu/~hall/java/Servlet-Tutorial/Servlet-Tutorial-Request-Headers.html
0
 
matthew016Author Commented:
This still doesn't give me the use of it.
Why one would like to know if it's post or get request, browser, etc .

0
 
matthew016Author Commented:
Thank you.
Can U tell me about the filters or maybe a link ?
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.