The process of transferring data between a relational database and Java objects is the same regardless of what type of application you're writing. If you're not familiar with how JDBC works, I'd suggest you spend some time with some JDBC tutorials such as this one. Once you learn this process, you can simply plug the JDBC code into your Struts application. For example, if you wanted to make the example you've mentioned above use a real Database rather than just static variables, write some JDBC code and plug it into the IndexedBusinessLayer class and the rest of the example will work as-is. [ October 02, 2007: Message edited by: Merrill Higginson ]
Then it does not seem like it would be too hard to translate the code into update queries. Are you just trying to get the example working with a database or are you trying to apply the concepts to your real application?
Joined: Feb 15, 2005
It's one thing to be able to write SQL statements. It's another to be able to use them within the context of the JDBC API. If you don't already know how to use this API, you'll need to learn it before going any further. Here's a brief example:
[ October 02, 2007: Message edited by: Merrill Higginson ]
Joined: Jun 26, 2001
Thank you very much, your help is appreciated.
subject: display items from DB, update and save ??