• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

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
 
reply
    Bookmark Topic Watch Topic
  • New Topic