You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Ugo Cei <u....@cbim.it> on 2003/10/23 21:11:50 UTC
Re: [suggestion] Method getParameterMap in Request?
Stephan Coboos wrote:
> in my opnion it would be nice to have a method like getParameterMap() from
> Servlet programming which returns all request parameters as name value pairs
> in a hash map. This method should reside in interface
> org.cocoon.apache.environment.Request oder ....http.HttpRequest.
Unfortunately it is possible to have more than one value for a single
parameter.
Ugo
Re: [suggestion] Method getParameterMap in Request?
Posted by Stephan Coboos <cr...@gmx.net>.
----- Original Message -----
From: "Carsten Ziegeler" <cz...@s-und-n.de>
To: <de...@cocoon.apache.org>
Sent: Friday, October 24, 2003 2:28 PM
Subject: RE: [suggestion] Method getParameterMap in Request?
> Stephan Coboos wrote:
> > > What do you think of adding a static helper method somewhere?
> >
> > If no getParameterMap method exists, I have to implement such a method
> > myself.
> >
> Yes, and you can send a patch that we can apply and then it exists
> officially.
Static or "normal"?
Regards
Stephan
RE: [suggestion] Method getParameterMap in Request?
Posted by Carsten Ziegeler <cz...@s-und-n.de>.
Stephan Coboos wrote:
> > What do you think of adding a static helper method somewhere?
>
> If no getParameterMap method exists, I have to implement such a method
> myself.
>
Yes, and you can send a patch that we can apply and then it exists
officially.
Carsten
Re: [suggestion] Method getParameterMap in Request?
Posted by Stephan Coboos <cr...@gmx.net>.
----- Original Message -----
From: "Carsten Ziegeler" <cz...@s-und-n.de>
To: <de...@cocoon.apache.org>
Sent: Friday, October 24, 2003 8:18 AM
Subject: RE: [suggestion] Method getParameterMap in Request?
> I'm not very happy about changing our Request interface. The information
> you need to get a parameter map is already in the Request object.
> You can get all parameter names and all values for one parameter.
Yes, of course. But I think it is a little bit uncomfortable... but was just
an idea because in J2EE this method exist, too.
> What do you think of adding a static helper method somewhere?
If no getParameterMap method exists, I have to implement such a method
myself.
Thank you.
Regards
Stephan
RE: [suggestion] Method getParameterMap in Request?
Posted by Carsten Ziegeler <cz...@s-und-n.de>.
I'm not very happy about changing our Request interface. The information
you need to get a parameter map is already in the Request object.
You can get all parameter names and all values for one parameter.
What do you think of adding a static helper method somewhere?
Carsten
Stephan Coboos wrote:
>
>
> > Stephan Coboos wrote:
> > > in my opnion it would be nice to have a method like getParameterMap()
> from
> > > Servlet programming which returns all request parameters as name value
> pairs
> > > in a hash map. This method should reside in interface
> > > org.cocoon.apache.environment.Request oder ....http.HttpRequest.
> >
> > Unfortunately it is possible to have more than one value for a single
> > parameter.
>
> Yes. In Servlet programming, too. Here, a string array would
> returned. Here
> is a snipplet from the J2EE javadoc:
>
> Returns:
> an immutable java.util.Map containing parameter names as keys and
> parameter
> values as map values. The keys in the parameter map are of type
> String. The
> values in the parameter map are of type String array.
>
> It would be possible and standarized ;-))
>
> Thank you.
>
> Regards
> Stephan
>
>
Re: [suggestion] Method getParameterMap in Request?
Posted by Stephan Coboos <cr...@gmx.net>.
----- Original Message -----
From: "Ugo Cei" <u....@cbim.it>
To: <de...@cocoon.apache.org>
Sent: Thursday, October 23, 2003 9:11 PM
Subject: Re: [suggestion] Method getParameterMap in Request?
> Stephan Coboos wrote:
> > in my opnion it would be nice to have a method like getParameterMap()
from
> > Servlet programming which returns all request parameters as name value
pairs
> > in a hash map. This method should reside in interface
> > org.cocoon.apache.environment.Request oder ....http.HttpRequest.
>
> Unfortunately it is possible to have more than one value for a single
> parameter.
Yes. In Servlet programming, too. Here, a string array would returned. Here
is a snipplet from the J2EE javadoc:
Returns:
an immutable java.util.Map containing parameter names as keys and parameter
values as map values. The keys in the parameter map are of type String. The
values in the parameter map are of type String array.
It would be possible and standarized ;-))
Thank you.
Regards
Stephan