You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by bu...@apache.org on 2002/07/26 01:36:03 UTC

DO NOT REPLY [Bug 11187] New: - Question on request.getHeaderNames()

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=11187>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=11187

Question on request.getHeaderNames()

           Summary: Question on request.getHeaderNames()
           Product: Tomcat 4
           Version: 4.1.0
          Platform: Other
        OS/Version: Other
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: Webapps:Examples
        AssignedTo: tomcat-dev@jakarta.apache.org
        ReportedBy: mgainty@hotmail.com


In RequestInfoExample I am attempting to access the header variables

Here is the code:
        Enumeration enum=request.getHeaderNames();
        int i=0;
        while(enum.hasMoreElements())
        {
            try
            {
                if(enum.toString()==null) break;
                String str=enum.toString();
                out.println("<tr><td>");
                out.println("Header Name");
                out.println("</td><td>");
                out.println(str);
                out.println("</td></tr>");
                enum.nextElement();
            }
            catch(java.lang.ArrayIndexOutOfBoundsException a)
            {
                break;
            }
        }
This is the output:
Header Name  org.apache.tomcat.util.http.NamesEnumerator@35bb0f  

How do I get the Header Variables and their values???
Thank You,

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>