aspose file tools
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes one more doubt Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Reply Bookmark "one more doubt" Watch "one more doubt" New topic
Author

one more doubt

namaskaram sir
Greenhorn

Joined: May 22, 2003
Posts: 5
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
<%= 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

'no worries'
[ May 25, 2003: Message edited by: Amer Khan ]

<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
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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: one more doubt
 
Similar Threads
HttpSessionBindingListener Q
how to make this as an output ?
Static
to print the value from a javascript function
how to print in java !!!