[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 471
  • Last Modified:

getHeaderNames

I know the function  getHeaderNames
returns the http headers.
What can be the use of it ?
Thank you.
0
matthew016
Asked:
matthew016
  • 3
  • 2
1 Solution
 
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
 
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
 
matthew016Author Commented:
Thank you.
Can U tell me about the filters or maybe a link ?
0

Featured Post

The 14th Annual Expert Award Winners

The results are in! Meet the top members of our 2017 Expert Awards. Congratulations to all who qualified!

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now