Getting the Request header



Introduction

The Request Header contains all kinds of useful data, like the requesters method (GET or POST) but also the requester’s browser an OS. This example shows how to get it;

The request method is <%= request.getMethod() %>
The request URI is <%= request.getRequestURI() %>
The request protocol is <%= request.getProtocol() %>
The browser is <%= request.getHeader("user-agent") %>

 

One thought on “Getting the Request header”

  1. Hi, i think that i saw you visited my weblog thus i came to “return the favor”.I am attempting to find things to improve my website!I suppose its ok to use a few of your ideas!!

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.