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.

Recommended Answers

All 3 Replies

Whether u r able to get the select box value in the action class whn u select or deselect the select box??????

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?

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

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.