• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

how to connect database and a struts program

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi,
i want to know how to connect a database in the struts prog....my prog is to search employee details by giving his id in home page.....
 
Ranch Hand
Posts: 349
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You do it pretty much the same way you'd do it through any other java program. The most common way in my experience is to use jdbc to get access to a connection pool that has been set up on the application server you're running. Normally you'll want to do this either in you action class or in a class called by your action class. Try looking for information and examples on how to use jdbc in conjunction with your app server. Here's an example of a page that explains how to use jdbc with a glassfish application server:


glassfish jdbc resource
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic