Hi Anup,

 Your code below works fine thanks, and I have tried this before.

 The problem is I do not want the headers parsed for me into an Enumaration.
 Instead I want to be able to see the raw HTTP header as it is passed to the
 servlet. The reason for this is that we suspect there is something dodgey
 being put into the header by our Oracle Application Server.

 Thanks,

 Andy

> ----- Original Message -----
> From: Anup KM <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Thursday, July 20, 2000 5:52 AM
> Subject: Re: request.getInputStream() returns no data
>
>
> > hi andy
> >
> > instead of reading from the inputstream directly.
> > try the following code
> >
> > Enumeration headers=request.getHeaderNames();
> > while(headers.hasMoreElements()){
> >         String headname= (String)headers.nextElement();
> >         out.println(request.getHeader(headname));
> > }
> >
> > regards
> > Anup
> >
> >
> >
> > At 07:21 PM 7/19/00 +0200, you wrote:
> > >Hi all,
> > >
> > >I am unsuccessfully trying to display the "raw" HTTP header that gets
> sent
> > >to my server.
> > >I have written the code below, but the BufferedReader returns no data
at
> > >all. In fact
> > >the print statement displays "Ready: false" indicating there is no
data.
> I
> > >am running the
> > >servlet on Oracle Application Server.
> > >
> > >All ideas welcome, as I desperately need this to work to troubleshoot a
> WAP
> > >gateway.
> > >
> > >Regards,
> > >
> > >Andy
> > >---
> > >www.andymayer.com
> > >
> > >
> > >public class Header extends HttpServlet {
> > >
> > >public void service ( HttpServletRequest request, HttpServletResponse
> > >response)
> > >throws ServletException, IOException {
> > >
> > >     response.setContentType("text/html");
> > >    PrintWriter out = response.getWriter();
> > >
> > >    ServletInputStream inStream = request.getInputStream();
> > >    InputStreamReader inputStreamReader = new
> InputStreamReader(inStream);
> > >    out.println("Ready : "+inputStreamReader.ready());
> > >
> > >    BufferedReader in = new BufferedReader(inputStreamReader);
> > >
> > >    String inputLine;
> > >    while ((inputLine = in.readLine()) != null) {
> > >         out.println(inputLine);
> > >}
> > >
> >
>
>___________________________________________________________________________
> > >To unsubscribe, send email to [EMAIL PROTECTED] and include in the
> body
> > >of the message "signoff SERVLET-INTEREST".
> > >
> > >Archives: http://archives.java.sun.com/archives/servlet-interest.html
> > >Resources: http://java.sun.com/products/servlet/external-resources.html
> > >LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
> > >
> >
> >
>
___________________________________________________________________________
> > To unsubscribe, send email to [EMAIL PROTECTED] and include in the
> body
> > of the message "signoff SERVLET-INTEREST".
> >
> > Archives: http://archives.java.sun.com/archives/servlet-interest.html
> > Resources: http://java.sun.com/products/servlet/external-resources.html
> > LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
> >
>

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to