• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

how can i fire update query in struts?

 
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Ranch Hand
Posts: 4864
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Aakash Dodiya
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
And when my army is complete, I will rule the world! But, for now, I'm going to be happy with this tiny ad:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic