passing values of Select box from JSP to Action class thru form Bean

Thread Solved

Join Date: Sep 2004
Posts: 1
Reputation: saivemuri is an unknown quantity at this point 
Solved Threads: 0
saivemuri saivemuri is offline Offline
Newbie Poster

passing values of Select box from JSP to Action class thru form Bean

 
0
  #1
Sep 1st, 2004
This is about jsp, beans with struts. The problem is, I am using one jsp which is containing some select boxes. I ll be populating the select boxes from DB thru beans and action class. It’s working properly. The problem is with the data insertion from JSP to DB. The case is, I have to add a new record (record is containing the select boxes data as fields). Now if I select any data from the ‘select’box, I have to capture that data thru ‘action class’ and then pass that to ‘form Bean’ so that I can update my DB with the new record. But what is happening is, I am unable to get the values of the ‘select box’ data from the JSP to action class thru form Bean. Can any one help me out with this? One more thing, I can’t use sessions in JSP. If any one can provide some examples in this regard, that will be of great use.
Reply With Quote Quick reply to this message  
Join Date: Aug 2006
Posts: 1
Reputation: mukeshky is an unknown quantity at this point 
Solved Threads: 1
mukeshky mukeshky is offline Offline
Newbie Poster

Re: passing values of Select box from JSP to Action class thru form Bean

 
0
  #2
Aug 22nd, 2006
Whether u r able to get the select box value in the action class whn u select or deselect the select box??????
Reply With Quote Quick reply to this message  
Join Date: Jul 2009
Posts: 1
Reputation: Labs is an unknown quantity at this point 
Solved Threads: 1
Labs Labs is offline Offline
Newbie Poster

Re: passing values of Select box from JSP to Action class thru form Bean

 
0
  #3
Jul 22nd, 2009
hey i hav same problem.. i cant get select box values to action class,.... hw to map it.. i mean 1stly hw does the multiple select box value pass .. as an array.. as a string.. waa?
Reply With Quote Quick reply to this message  
Join Date: Dec 2004
Posts: 4,176
Reputation: peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of 
Solved Threads: 479
Moderator
Featured Poster
peter_budo's Avatar
peter_budo peter_budo is online now Online
Code tags enforcer

Re: passing values of Select box from JSP to Action class thru form Bean

 
0
  #4
Jul 22nd, 2009
For single parameter you will use getParameter(java.lang.String name). If you look just few lines below this method in ServletRequest API you will see getParameterValues(java.lang.String name) to get multiple selection
Learn to see in another's calamity the ills which you should avoid.
Publilius Syrus
(~100 BC)

LJC - London Java Community, Graduate & Undergraduate Software Development Community, JAVAWUG (Java Web User Group), The London Android Group
Reply With Quote Quick reply to this message  
Reply

This thread has been marked solved.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC