One of the problems seems to be that Webware just sucks up all of the raw input.  Is there a way to recoved this?

I want to pull out the POST data directly, is there a good way?
The POST data is already in FieldStorage, but I want it just the way the browser sent it.

Thanks,
-Aaron

Chris Prinos wrote:
-----Original Message-----
From: webware-discuss-admin@lists.sourceforge.net
[mailto:webware-discuss-admin@lists.sourceforge.net]On Behalf Of
jose@cybergalvez.com
Sent: Thursday, April 17, 2003 7:33 PM
    

  
I can't seem to get self.request().rawInput() (with or
without the rewind=1
option) to work.

Essentually I have a webpage that calls a servlet via a
form/Post and if I
then call self.writeln(self.request().rawInput()) I get back
None.  Now I
know the form is sending some data, because all it does is
send a hidden
variable.  Any thoughts as to what I am doing worng?
    

rawInput will only return a file if the data being POSTed can't be consumed
by the cgi/FieldStorage code first. If you're using a typical form posting,
then the content type would be application/x-www-form-urlencoded  and the
data from the form gets sent as encoded name value pairs. You can access
them from your servlet code using self.request().field(myFormFieldName). If
it's a multipart form, then you can get to the parts using
self.request().fieldStorage()

In either of those two cases there won't be a file available from
rawInput(), it's already been processed by that point. This shouldn't be a
problem though, as you should be able to access all the data through
self.request().field() or self.request().fieldStorage()

For content-types other than application/x-www-form-urlencoded or
multipart/form-data, you can use rawInput().

Chris



-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Webware-discuss mailing list
Webware-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/webware-discuss