File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Struts and the fly likes how can i fire update query in struts? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "how can i fire update query in struts?" Watch "how can i fire update query in struts?" New topic
Author

how can i fire update query in struts?

Aakash Dodiya
Greenhorn

Joined: Aug 21, 2005
Posts: 7
i want to update table in database from struts.
i dont know how to do this.
how can i fire query for updation in table.
please help me quickly.
Merrill Higginson
Ranch Hand

Joined: Feb 15, 2005
Posts: 4864
In struts, data persistence is normally initiated by the Action class. Although there are a number of frameworks by which you can persist data in a database (JDO, Hibernate, Entity EJBs to name a few), the most common is JDBC. Although you could put the JDBC code into the Action class, it is much better to create another class or classes that handle data persistence, and have the action call methods on these classes.

If you don't know how to use JDBC to update a table, I'd suggest you do a search on "JDBC tutorial" and you will find many helpful suggestions on how to do this.


Merrill
Consultant, Sima Solutions
Aakash Dodiya
Greenhorn

Joined: Aug 21, 2005
Posts: 7
thanx for ur suggestion
i know jdbc how to update table but i dont know how to work with struts.
now i know how to do this
thanx again.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: how can i fire update query in struts?