aspose file tools*
The moose likes Struts and the fly likes Example on struts database connectivity Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Example on struts database connectivity" Watch "Example on struts database connectivity" New topic
Author

Example on struts database connectivity

vin Hari
Ranch Hand

Joined: Nov 16, 2006
Posts: 161
Hello all,
Iam trying for using the struts with database connectivity,
can anyone please give me an example for that please.
sreenivas jeenor
Ranch Hand

Joined: Jan 09, 2005
Posts: 125
The best practice for connecting to a JDBC DataSource in a Struts or any J2EE Web Application is to define the DataSource as a JNDI resource using your Application Server's preferred method and then using JNDI to look up the DataSource in your application code. If you're using Tomcat, this link explains how to do it.

Also see question 7 in the JavaRanch Struts FAQ
vin Hari
Ranch Hand

Joined: Nov 16, 2006
Posts: 161
Hello sir,
Thank you for your reply but sir there was no hyperlink which you referred there
sreenivas jeenor
Ranch Hand

Joined: Jan 09, 2005
Posts: 125
If you're using Tomcat, this link explains how to do it.

Also see question 7 in the JavaRanch Struts faq
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Example on struts database connectivity