• Post Reply Bookmark Topic Watch Topic
  • New Topic

How to get values in Java bean

 
John Ray Allen
Ranch Hand
Posts: 50
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
my problem is i have objects in JSP having the same name with different id's..ex <input type="checkbox" name="sample" id="1" value="some value"> <input type="checkbox" name="sample" id="2" value="some value">. How will i declare and get the values of that objects on my bean saying i have a SampleBean and my setter and getter methods like getSample() and setSample()? How can i get the values of all of that objects having same names in my bean? thanks in advance!
[ April 27, 2006: Message edited by: Bear Bibeault ]
 
kishor chandra
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,
how many beans you are using for this applications?

as you have mentioned id="1" and id="2". are these two beans?
just explain what you want to do.

if these are beans then use
jsp:usebean with getProperty(); with id.
...........
 
Adeel Ansari
Ranch Hand
Posts: 2874
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What are you getting while doing request.getParameter("1") and request.getParameter("2")?
[ April 27, 2006: Message edited by: Adeel Ansari ]
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!