944,208 Members | Top Members by Rank

Ad:
  • JSP Discussion Thread
  • Marked Solved
  • Views: 30190
  • JSP RSS
Sep 1st, 2004
0

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

Expand Post »
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.
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
saivemuri is offline Offline
1 posts
since Sep 2004
Aug 22nd, 2006
0

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

Whether u r able to get the select box value in the action class whn u select or deselect the select box??????
Reputation Points: 10
Solved Threads: 1
Newbie Poster
mukeshky is offline Offline
1 posts
since Aug 2006
Jul 22nd, 2009
0

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

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?
Reputation Points: 10
Solved Threads: 1
Newbie Poster
Labs is offline Offline
1 posts
since Jul 2009
Jul 22nd, 2009
-1

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

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
Moderator
Featured Poster
Reputation Points: 2786
Solved Threads: 875
Code tags enforcer
peter_budo is offline Offline
6,659 posts
since Dec 2004

This thread is solved

Either the thread starter or a moderator has marked this thread as solved. You can most likely trust the responses and answers given. There is most likely no reason for any further responses to be posted here. If you have a related question, please start a new thread in this forum instead.

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in JSP Forum Timeline: Radio button name
Next Thread in JSP Forum Timeline: Strange page loading





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC