Return-Path: Delivered-To: apmail-xml-cocoon-users-archive@xml.apache.org Received: (qmail 19894 invoked by uid 500); 8 Apr 2001 16:27:52 -0000 Mailing-List: contact cocoon-users-help@xml.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: list-post: Reply-To: cocoon-users@xml.apache.org Delivered-To: mailing list cocoon-users@xml.apache.org Received: (qmail 19880 invoked from network); 8 Apr 2001 16:27:51 -0000 Message-ID: <002001c0c046$bb2239c0$890e7218@slnt1.on.wave.home.com> Reply-To: "Gritsenko" From: "Gritsenko" To: References: Subject: Re: getting whole POSTed datas Date: Sun, 8 Apr 2001 12:12:37 -0400 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_001D_01C0C025.33B50C40" X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.00.2615.200 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2615.200 X-Spam-Rating: h31.sny.collab.net 1.6.2 0/1000/N ------=_NextPart_000_001D_01C0C025.33B50C40 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable 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 -----=20 From: St=E9phane Arzt=20 To: cocoon-users@xml.apache.org=20 Sent: Sunday, April 08, 2001 12:23 PM Subject: RE: getting whole POSTed datas May you just tell me a little more please ?? =20 I done : =20 ServletInputStream s =3D request.getInputStream(); int clength =3D request.ContentLength(); byte buff[] =3D null; =20 s.readLine(buff, 0 clength); =20 Now I have an array of byte..(I think ???), but when I do = b It return me nothing.... May you tell me where I make mistake please ? =20 Thanks =20 Stef =20 =20 Try request.getInputStream(); This will give you a servletinputstream = from which you can read the raw data.=20 =20 regards =20 Rob ----- Original Message -----=20 From: Stephane Arzt=20 To: cocoon-users@xml.apache.org=20 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? 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 ?? =20 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.=20 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).=20 If you use this method with a multivalued parameter, the servlet = engine determines the return value. Parameters:=20 name - a String specifying the name of the parameter=20 Returns:=20 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. To unsubscribe, e-mail: = For additional commands, e-mail: = Pozdrowienia, Oskar Werewka=20 ------=_NextPart_000_001D_01C0C025.33B50C40 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
Read a chapter on Java Servlet API in any Java = Serlet=20 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=20 to drive a car on a maillist. Of course, you can continue to ask these, = noone=20 can prevent you from doing that, but that's what I think the nature = of=20 these questions is.
 
Viktor
 
 
----- Original Message -----
From:=20 St=E9phane = Arzt
To: cocoon-users@xml.apache.org =
Sent: Sunday, April 08, 2001 = 12:23=20 PM
Subject: RE: getting whole = POSTed=20 datas

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

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

 

Try to use this ;)

getParameter
public java.lang.String=20 getParameter(java.lang.String name)
Returns the = value=20 of a request parameter as a String, or=20 null if the parameter does not exist. Request parameters are = extra=20 information sent with the request.
You should only = use this=20 method when you are sure the parameter has only one value. If = the=20 parameter might have more than one value, use getParameterValues(java.lang.String).=20
If you use this method with a multivalued parameter, the = servlet=20 engine determines the return value.
Parameters: =
name - a String specifying the = name of the=20 parameter
Returns:
a String representing the single = value of the=20 parameter



Hello,

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

Thanks

Stef


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

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

Pozdrowienia,
Oskar Werewka=20

------=_NextPart_000_001D_01C0C025.33B50C40--