cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gritsenko" <vgritse...@acm.org>
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
on Amazon.com).
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.

Viktor


----- Original Message ----- 
  From: St├ęphane Arzt 
  To: cocoon-users@xml.apache.org 
  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 ?
   
  Thanks
   
  Stef
   
   
   Try request.getInputStream(); This will give you a servletinputstream from which you can
read the raw data. 
   
       regards
     
    Rob
      ----- Original Message ----- 
      From: Stephane Arzt 
      To: cocoon-users@xml.apache.org 
      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 ;)

        getParameter
        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.
        Parameters: 
        name - a String specifying the name of the parameter 
        Returns: 
        a String representing the single value of the parameter




          Hello,

          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 ?

          Thanks

          Stef


          ---------------------------------------------------------------------
          Please check that your question has not already been answered in the
          FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

          To unsubscribe, e-mail: <cocoon-users-unsubscribe@xml.apache.org>
          For additional commands, e-mail: <cocoon-users-help@xml.apache.org>
        Pozdrowienia,
        Oskar Werewka 


Mime
View raw message