From: "C.F. Scheidecker Antunes" <[EMAIL PROTECTED]> > What I would like to learn right now is how to get information from a > Select statement from a database and display it on a HTML table. That > is, first I have a search form > and them a search result with records from a MySQL database. I know how > to do it with Servlets and JSPs but I would like to see a piece of code > using the Struts framework.
It's the same piece of code, assuming you've designed it right. :) Struts has nothing to do with reading from the database. Hopefully, you haven't embedded a bunch of JDBC in your Servlet. If you have, now would be a good time to move it out into a separate class (or layer, depending on how complex it is). Even better, use Hibernate or one of the other existing O/R mapping tools. Once you have a good system for retrieving data, you can use it with any application, Struts, Swing, or command-line. Have you installed the examples that ship with Struts? Particularly, the 'struts-mailreader' example will show you how to accept input from HTML forms and work with it. For paging results, I hear good things about DisplayTag http://displaytag.sourceforge.net/ but I haven't used it myself. -- Wendy Smoak --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]