Two Laptop Bag*
The moose likes JSP and the fly likes passing an array Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "passing an array" Watch "passing an array" New topic
Author

passing an array

Daniel Layher
Greenhorn

Joined: Jul 14, 2006
Posts: 19
I know this sounds super easy but i can't figure it out. I have a select box that is populated on the fly through a database. The select box is also has multiple set to true so you can choose more than one option. However, every time i try to pass it to the servlet it, only the first selection is passed. I'm pretty sure that it is set up as an array, but I'm not sure how to pass the array, which doesn't have a set size, to the servlet. Any suggestions??? Thanks ahead of time.
Christophe Verré
Sheriff

Joined: Nov 24, 2005
Posts: 14687
    
  16

Which method did you call in your servlet ? Did you try getParameterValues ?


[My Blog]
All roads lead to JavaRanch
Daniel Layher
Greenhorn

Joined: Jul 14, 2006
Posts: 19
Worked like a charm. Thank you. I was just using .getParameter(). that made all the difference. Thanks again.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: passing an array
 
Similar Threads
scriplets in jsp's
JSP Combobox and Java Class
Populating drop-down box in JSP using bean
Setting Name and ID inside loop
unable to pass data in same package