> -----Original Message-----
> From: Wendy Smoak [mailto:[EMAIL PROTECTED]
==////==
> 
> 
> 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

I would second Wendy's advice, try to follow the example mailreader.

The best advice with Struts is try to understand how all the parts
of the framework fit together. 

Action, ActionForm, ActionServlet, View Helpers [Custom Tag libraries]

The good news is that Struts framework is relatively a small scale 
library compared to larger library, e.g. Hibernate. Look for articles
on Struts on the TheServerSide.com, Javaworld.com and OnJava.com and
you will be fine.


--
Peter Pilgrim
Operations/IT - Credit Suisse First Boston, 
Floor 15, 5 Canada Square, London E14 4QJ, United Kingdom
Tel: +44-(0)207-883-4497

==============================================================================
Please access the attached hyperlink for an important electronic communications 
disclaimer: 

http://www.csfb.com/legal_terms/disclaimer_external_email.shtml

==============================================================================


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to