Re: [Simpleweb-Support] getParameterValues method on simple.http.Request
Brought to you by:
niallg
From: Niall G. <gal...@ya...> - 2006-03-23 17:15:09
|
Hi Dennis, The Parameters object used to have a getParameters() method that returned multiple values for a single name. I removed it some time ago. I had been meaning to add it back, however I have not got around to it. Take a look at release 2.6 and you'll see the code for it in ParameterParser.insert. You can just plug this in, ill try to add this feature back. Niall --- Dennis Watson <de...@gu...> wrote: > Hi Carfield, > > On Wednesday 22 March 2006 19:57, Carfield Yim > wrote: > > May be use Request.getParameters() that return > Parameters ?? > > That will return a Parameters object with all of the > CGI variables, but I > don't think it helps in this case. I need to handle > CGI variables with > multiple values, not just multiple CGI variables. > > Consider what happens when you are receiving data > from a form with check boxes > on it. You will have a single CGI variable with > multiple values (one for > each box checked). The servlet spec has the method > String[] > getParameterValues() to deal with such cases, but I > don't see this for > Simple. > > > Dennis > > > > On 3/23/06, Dennis Watson <de...@gu...> wrote: > > > Hi, > > > > > > I need to handle URLs with multiple values for > the same CGI variable such > > > as: > > > > > > http://simple.server.com?a=1&a=2&a=3 > > > > > > According to the Simple documentation the > Parameters interface "follows > > > the parameter methods found in the Java Servlet > API Specification." This > > > means I should be able to get multiple values > out using the > > > getParameterValues like so: > > > > > > String[] a = req.getParameterValues("a"); > > > > > > But I don't see this method in the Simple > javadoc and it breaks when I > > > try and complie my program with this method. > > > > > > How can I get multiple values for a single named > variable? > > > > > > TIA, > > > > > > > > > Dennis > > > > > > > > > > > > > ------------------------------------------------------- > > > This SF.Net email is sponsored by xPML, a > groundbreaking scripting > > > language that extends applications into web and > mobile media. Attend the > > > live webcast and join the prime developer group > breaking into this new > > > coding territory! > > > > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642 > > > _______________________________________________ > > > Simpleweb-Support mailing list > > > Sim...@li... > > > > https://lists.sourceforge.net/lists/listinfo/simpleweb-support > > > > > ------------------------------------------------------- > > This SF.Net email is sponsored by xPML, a > groundbreaking scripting language > > that extends applications into web and mobile > media. Attend the live > > webcast and join the prime developer group > breaking into this new coding > > territory! > > > http://sel.as-us.falkag.net/sel?cmd=lnk&kid0944&bid$1720&dat1642 > > _______________________________________________ > > Simpleweb-Support mailing list > > Sim...@li... > > > https://lists.sourceforge.net/lists/listinfo/simpleweb-support > > > ------------------------------------------------------- > This SF.Net email is sponsored by xPML, a > groundbreaking scripting language > that extends applications into web and mobile media. > Attend the live webcast > and join the prime developer group breaking into > this new coding territory! > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642 > _______________________________________________ > Simpleweb-Support mailing list > Sim...@li... > https://lists.sourceforge.net/lists/listinfo/simpleweb-support > Niall Gallagher __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com |