aspose file tools*
The moose likes Struts and the fly likes connecting database through struts Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "connecting database through struts " Watch "connecting database through struts " New topic
Author

connecting database through struts

mareena
Greenhorn

Joined: May 31, 2004
Posts: 9
Hello Sir

I heard about connecting database through struts two ways
1. Action class
2. struts config.xml


i have problem in connecting database through struts as i am relevently new to it. i wanted to test it with my MS Access.

Please help me how to do this

thanks
Nicholas Cheung
Ranch Hand

Joined: Nov 07, 2003
Posts: 4982
How did you connect?

I have no problem with connecting the DB in Structs.

For simplicity, you can create a JDBC reference in the ActionDispatcher, and connect to the DB by JDBC driver.

If you know a bit about JNDI, you may bind the connection reference to the JNDI, and look it up in the Action method.

What is the problem you actually faced?

Nick


SCJP 1.2, OCP 9i DBA, SCWCD 1.3, SCJP 1.4 (SAI), SCJD 1.4, SCWCD 1.4 (Beta), ICED (IBM 287, IBM 484, IBM 486), SCMAD 1.0 (Beta), SCBCD 1.3, ICSD (IBM 288), ICDBA (IBM 700, IBM 701), SCDJWS, ICSD (IBM 348), OCP 10g DBA (Beta), SCJP 5.0 (Beta), SCJA 1.0 (Beta), MCP(70-270), SCBCD 5.0 (Beta), SCJP 6.0, SCEA for JEE5 (in progress)
Sandra Cann
Greenhorn

Joined: Oct 18, 2002
Posts: 3
Expresso (open source) provides much in the way of quickly creating databased applications with Struts integration. The new release Expresso 5.5 now integrates with Struts 1.1. You can find it at www.jcorporate.com.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: connecting database through struts