Jetty Post Parameters [message #102227] |
Sat, 01 December 2007 00:27 |
Eclipse User |
|
|
|
Originally posted by: irbull.cs.uvic.ca
Hi all,
I have created a simple webform (hosted by a jetty server running on
equinox) and when I submit the form, I can't seem to figure out how to
get the parameters (name / value pairs).
If I get the request::getInputStream() I get content (see below), but I
thought these values should be mapped to some name value pair (like
request::getParameter(), but there are no params in my request object.
Should this be parsed for me? Or is this something I have to do myself?
This also may be my lack of understanding of servlets :-(
Thanks,
Ian
-----------------------------7d71b5e390850
Content-Disposition: form-data; name="textBoxFormElement"
adfadfadfad
-----------------------------7d71b5e390850
Content-Disposition: form-data; name="listBoxFormElement"
fooValue
-----------------------------7d71b5e390850
Content-Disposition: form-data; name="uploadFormElement";
filename="C:\Auth.prof"
Content-Type: text/plain
[PROF_MGR]
PROF_NUM=0
SEL_PROF_ID=
|
|
|
Re: Jetty Post Parameters [message #102241 is a reply to message #102227] |
Sat, 01 December 2007 03:34 |
Eclipse User |
|
|
|
Originally posted by: irbull.cs.uvic.ca
After a little more investigation, it seems that it is the content type.
If I set the encoding type to multipart then getParameters returns
nothing, but if I have it set to ENCODING_URLENCODED then the params work.
any ideas?
Cheers,
ian
Ian Bull wrote:
> Hi all,
>
> I have created a simple webform (hosted by a jetty server running on
> equinox) and when I submit the form, I can't seem to figure out how to
> get the parameters (name / value pairs).
>
> If I get the request::getInputStream() I get content (see below), but I
> thought these values should be mapped to some name value pair (like
> request::getParameter(), but there are no params in my request object.
>
> Should this be parsed for me? Or is this something I have to do myself?
>
> This also may be my lack of understanding of servlets :-(
>
> Thanks,
> Ian
>
> -----------------------------7d71b5e390850
> Content-Disposition: form-data; name="textBoxFormElement"
>
> adfadfadfad
> -----------------------------7d71b5e390850
> Content-Disposition: form-data; name="listBoxFormElement"
>
> fooValue
> -----------------------------7d71b5e390850
> Content-Disposition: form-data; name="uploadFormElement";
> filename="C:\Auth.prof"
> Content-Type: text/plain
>
> [PROF_MGR]
> PROF_NUM=0
> SEL_PROF_ID=
|
|
|
Re: Jetty Post Parameters [message #102254 is a reply to message #102241] |
Sat, 01 December 2007 04:23 |
Eclipse User |
|
|
|
Originally posted by: irbull.cs.uvic.ca
Ok, I have figured it out :-)
I can use:
MultiPartRequest mpr = new MultiPartRequest(req);
to parse the multipart requests.
cheers,
ian
Ian Bull wrote:
> After a little more investigation, it seems that it is the content type.
> If I set the encoding type to multipart then getParameters returns
> nothing, but if I have it set to ENCODING_URLENCODED then the params work.
>
> any ideas?
>
> Cheers,
> ian
>
> Ian Bull wrote:
>> Hi all,
>>
>> I have created a simple webform (hosted by a jetty server running on
>> equinox) and when I submit the form, I can't seem to figure out how to
>> get the parameters (name / value pairs).
>>
>> If I get the request::getInputStream() I get content (see below), but
>> I thought these values should be mapped to some name value pair (like
>> request::getParameter(), but there are no params in my request object.
>>
>> Should this be parsed for me? Or is this something I have to do myself?
>>
>> This also may be my lack of understanding of servlets :-(
>>
>> Thanks,
>> Ian
>>
>> -----------------------------7d71b5e390850
>> Content-Disposition: form-data; name="textBoxFormElement"
>>
>> adfadfadfad
>> -----------------------------7d71b5e390850
>> Content-Disposition: form-data; name="listBoxFormElement"
>>
>> fooValue
>> -----------------------------7d71b5e390850
>> Content-Disposition: form-data; name="uploadFormElement";
>> filename="C:\Auth.prof"
>> Content-Type: text/plain
>>
>> [PROF_MGR]
>> PROF_NUM=0
>> SEL_PROF_ID=
|
|
|
Powered by
FUDForum. Page generated in 0.02310 seconds