• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Rob Spoor
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Henry Wong
  • Liutauras Vilda
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Tim Holloway
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Mikalai Zaikin
  • Piet Souris

ServletRequest.

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm making an application that has this Listbox in a HTML Form and I'm building the servlet right now to get all the content of this Listbox and making it a array of Strings. I know that the getParameter() will return a String, although I dont have a clue on how this String would like if it's coming from a Listbox. Anyone has any idea?
My other doubt is if the getParameterValues() would work in such a situation?
My last doubt, how could I print the content of this String in a .jsp using the forward()? Would a out.print work?
 
Author and all-around good cowpoke
Posts: 13078
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If you have to take care of the possibility of multiple items selected in a list box then you certainly want to use getParameterValues. It returns either an array of String (from size 1 to ??) or null. Obviously, to print values from a String[] you need a loop.
Bill
 
Get me the mayor's office! I need to tell her about this tiny ad:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
reply
    Bookmark Topic Watch Topic
  • New Topic