Online Hibernate Training just in Rs. 1000

One week online training in Hibernate ORM framework. Learn Hibernate Framework and enhance your skills. Best Online Hibernate training at 90% discount. Join Now!! Offer is valid Only for limited Period!!! Online Training

getHeader() Method Of The Request Object

This section gives you the best illustration about the getHeader() method of the request object.

Ads

getHeader() Method Of The Request Object

     

This section gives you the best illustration about the getHeader() method of the request object. Here, you will learn more about the getHeader() method like why is it used and how is it implemented. Through the help of the section you will get the complete information about the HTTP header.

This method returns the value of the HTTP header like query string or the URL. This method takes a string parameter which is the header name retrieved by the method getHeaderNames() of the request object that gives all the HTTP header names in the enumeration form which has to be converted into string form later for getting the value of the value of the HTTP header from if one by one.

Here is the code of the GetHeaderMethod.jsp file:

<[email protected] import="java.util.*" %>
<%
	String headername = "";
	for(Enumeration e = request.getHeaderNames();
 e.hasMoreElements();){
		headername = (String)e.nextElement();
		out.println(request.getHeader
(headername) + "<br/>");
	}
%>

Output for the above mentioned file:

Download GetHeaderMethod.jsp file.

Advertisements

Ads
Share on Google+Share on Google+

getHeader() Method Of The Request Object

Posted on: February 9, 2008 If you enjoyed this post then why not add us on Google+? Add us to your Circles

Advertisements

Ads
 

Discuss: getHeader() Method Of The Request Object   View All Comments

Post your Comment


Your Name (*) :
Your Email :
Subject (*):
Your Comment (*):
  Reload Image
 
 
Comments:0

Ads

 

Ads