cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gritsenko" <>
Subject Re: getting whole POSTed datas
Date Sun, 08 Apr 2001 16:12:37 GMT
Read a chapter on Java Servlet API in any Java Serlet book, preferably O'Reily (look it up
There you will find the answers.

Questions you are asking are very basic, it's like asking hiw to drive a car on a maillist.
Of course, you can continue to ask these, noone can prevent you from doing that, but that's
what I think the nature of these questions is.


----- Original Message ----- 
  From: St├ęphane Arzt 
  Sent: Sunday, April 08, 2001 12:23 PM
  Subject: RE: getting whole POSTed datas

   May you just tell me a little more please ??
  I done :
  ServletInputStream s = request.getInputStream();
  int clength = request.ContentLength();
  byte buff[] = null;
  s.readLine(buff, 0 clength);
  Now I have an array of byte..(I think ???), but when I do <xsp:expr>b</xsp:expr>
It return me nothing....
  May you tell me where I make mistake please ?
   Try request.getInputStream(); This will give you a servletinputstream from which you can
read the raw data. 
      ----- Original Message ----- 
      From: Stephane Arzt 
      Sent: Sunday, April 08, 2001 9:29 PM
      Subject: RE: getting whole POSTed datas

      Thank you but I can't to do this because the datas I try to handle are in XML and are
only values without a parameter.
      It's like page.xml?<login username="foo" password="bar"/> for the get method.
      For this reason I'd like to make something like getQueryString() but for the POST method.
      Is there a way to catch these datas directly from the header of the request ??


        Try to use this ;)

        public java.lang.String getParameter(java.lang.String name)
        Returns the value of a request parameter as a String, or null if the parameter does
not exist. Request parameters are extra information sent with the request. 
        You should only use this method when you are sure the parameter has only one value.
If the parameter might have more than one value, use getParameterValues(java.lang.String).

        If you use this method with a multivalued parameter, the servlet engine determines
the return value.
        name - a String specifying the name of the parameter 
        a String representing the single value of the parameter


          I really need help...
          How may I get the whole POSTed datas from a form.
          I tried to use request.parsePostData() but I don't know to do this.
          May someone help me please ?



          Please check that your question has not already been answered in the
          FAQ before posting. <>

          To unsubscribe, e-mail: <>
          For additional commands, e-mail: <>
        Oskar Werewka 

View raw message