Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Equinox » Jetty Post Parameters
Jetty Post Parameters [message #102227] Sat, 01 December 2007 00:27 Go to next message
Eclipse UserFriend
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 Go to previous messageGo to next message
Eclipse UserFriend
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 Go to previous message
Eclipse UserFriend
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=
Previous Topic:Load of JDBC driver
Next Topic:Dynamic binding of jar file delivered meanwhile runtime.
Goto Forum:
  


Current Time: Mon Dec 06 12:28:46 GMT 2021

Powered by FUDForum. Page generated in 0.01865 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top