This week's book giveaway is in the Design forum.
We're giving away four copies of Building Microservices and have Sam Newman on-line!
See this thread for details.
The moose likes JSP and the fly likes idea of how to save records/ table dynamically ? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Building Microservices this week in the Design forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "idea of how to save records/ table dynamically ?" Watch "idea of how to save records/ table dynamically ?" New topic
Author

idea of how to save records/ table dynamically ?

Nakata kokuyo
Ranch Hand

Joined: Apr 13, 2005
Posts: 457
hi, good day , i currently maintain on pure jsp pages(without even servlet), my problem is, i have generate a record table say it contains 3 records, and the records table data is actually from List by session.getAttribute("recordList"), which look like below



however, there have some fields which is editable, in this case, qty1 and qty2 are the field allow editable, my problem now is, after user edit, when he/she click on save button, what are the good idea to save these records into DB ?

limitation : it is pure jsp page, with no servlet but pojo or helper class is the only i can code

thank you very much for guidance
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 63227
    
  69

As they are the best tools for use in conjunction with JSPs for a job such as this, why are you discounting using servlets?


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Nakata kokuyo
Ranch Hand

Joined: Apr 13, 2005
Posts: 457
bear, if using servlet, how the solution would be ?
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 63227
    
  69

This a very standard pattern that you would can find lots of information on.

Basically, your form would be submitted to a servlet which would then delegate the actual database manipulation to (preferably UI-agnostic) business logic classes. Upon completion of the processing, the servlet forwards oe redirects to a JSP page to render the resulting view.
 
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com
 
subject: idea of how to save records/ table dynamically ?
 
It's not a secret anymore!