This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Struts and the fly likes a question on data submitting Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "a question on data submitting" Watch "a question on data submitting" New topic

a question on data submitting

David Liu

Joined: Apr 16, 2002
Posts: 24
the case is:
first, user execute a query
and display the queried data in the <html:text> of jsp using tag <logic:iterate>
and I store the resultset in session and jsp get resultset from session
but after the query the user can modify the data and update the data in DB
but I wonder how can I transfer the modified resultset to ActionForm
and ActionForm transfers it to Action
because the resultset is a data-bean list and the ActionForm is a data-bean
this is the question
thanks for help

It's better burn out than to fade away.
Junilu Lacar

Joined: Feb 26, 2001
Posts: 4442

The Data Transfer Object pattern is useful in situations like this. [This tutorial makes extensive use of the pattern.
If your UI allows the user to change more than one record at a time, you'll need to put a collection of DTOs in your form as an indexed property.

Junilu - [How to Ask Questions] [How to Answer Questions]
Consider Paul's rocket mass heater.
subject: a question on data submitting
Similar Threads
struts database
Weird Question
ActionForm returning null in ActionClass
Export to excel
Struts and database connection