On your way in you may have missed that we have a policy on screen names here at JavaRanch. Basically, it must consist of a first name, a space, and a last name, and not be obviously fictitious. Since yours does not conform with it, please take a moment to change it, which you can do right here.
As to your question, the usual way to store values from an HTML page is to submit them to the server using an HTML form. Can you arrange for the elements to be part of a form?
Hi, I need to get the cell values of the HTML Table which is genereted dynamically. Is there is any ideas let me know.
Joined: Mar 22, 2005
Thanks for changing the display name. Unfortunately it doesn't yet meet the requirements, as I'm assuming that "subscribeid" is not your last name. Please fix this; accounts without valid display names are generally closed quickly.
Joined: Sep 05, 2008
Values in table cells are not submitted as part of a request. As Ulf suggested, you'll either need to copy the data into hidden elements that will be submitted, or to display the values in text fields to begin with.
As Ulf suggested, you can set it as a hidden parameter.
Or you can even create a collection on your jsp with the values of the elements. Then set the collection object in your request as a parameter/attribute. Iterate over it in your servlet and save to database.
Originally posted by Rahul Deshmukh: you can even create a collection on your jsp with the values of the elements. Then set the collection object in your request as a parameter/attribute. Iterate over it in your servlet and save to database.
No, that won't work. Any scoped attribute set on the request will go out of scope as soon as the response is sent to the client.