how can access datebase with struts
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   lei_cao
Posted On:   Sunday, March 10, 2002 07:00 PM

hello everyone:
i want make a project use struts,but i confused with it.i can insert a data to database,but i do not know how to get the datas from table and list it in jsp pages,and anyone can give me a example or tell me where i can find a tutorial also like update ,edit,delete use struts.
thanks for any help!

Re: how can access datebase with struts

Posted By:   Markus_Neifer  
Posted On:   Tuesday, March 12, 2002 03:06 AM

lei cao, accessing a database is not a Struts task. Struts gives you a framework for your application. It is recommended to access the database in your business logic beans only (or even better in your Data Access Objects, see http://java.sun.com/blueprints/patterns/j2ee_patterns/catalog.html for details). IMHO you're pulling business logic in your view when accessing the database from within your JSP pages.


Anyway, if you really, really want to do this, you should have a look at existing taglibs (see http://jakarta.apache.org/taglibs/doc/dbtags-doc/intro.html).


HTH, Markus

About | Sitemap | Contact