File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Servlets and the fly likes Handling Multiple form controls with same name Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Handling Multiple form controls with same name " Watch "Handling Multiple form controls with same name " New topic

Handling Multiple form controls with same name

Mohamed Jailani

Joined: Apr 01, 2005
Posts: 1
Hi All,
Could any one help me to code a Page which is having multiple controls elements like Text box,List box in which the all control to have the same name suppose I have a field called as answers ,for this In form bean i have defined the field as String[]
I am not able to load the page
gibing no getter method for property answers in form bean
Kindly could any one help me to over come this
Masha Klimenko
Ranch Hand

Joined: Feb 04, 2004
Posts: 31
Not much information but here is what could be happening:
your naming has to adgere to java bean conventions, so make sure that on
the page the name is spelled beginning with lower case: answers, and in the
bean you have methods getAnswers() and setAnswers(...); also if you have nested properties make sure that you are in the right place in the hierarchy.
Hope this helps

Neeraj Dheer
Ranch Hand

Joined: Mar 30, 2005
Posts: 225
can you post your code?
I agree. Here's the link:
subject: Handling Multiple form controls with same name
Similar Threads
Help Please?
Render different controls
How to update Session variable with Form Data ?
URGENT Help Needed ...!!
Submitting only selected textboxes in a JSP