how can we print will print the value of the Accept-Charset HTTP header in a JSP page?
light is my life
Amer Khan
Ranch Hand
Joined: Apr 05, 2003
Posts: 163
posted
0
<%= request.getHeader("headerName") %> or <% String header =request.getHeader("headerName"); out.print(header); %> for a header with more than one value! <% Enumeration e=request.getHeaders("headerName"); %>now enumerate (using a while loop) and print
<i>Dare to dream - everything that exists today,was once a figment of someone's imagination, nobody says tomorrow can't be a figment of your today.</i>
Fisher Daniel
Ranch Hand
Joined: Sep 14, 2001
Posts: 582
posted
0
You can use : <%= request.getHeader("Accept-Charset") %> or <% Enumeration enum = request.getHeaders("Accept-Charset"); while(enum.hasMoreElements()) { String value = (String) enum.nextElement(); out.println(value); } %> Correct me if i am wrong daniel