Wrox Programmer Forums
|
BOOK: Professional Jakarta Struts
This is the forum to discuss the Wrox book Professional Jakarta Struts by James Goodwill, Richard Hightower; ISBN: 9780764544378
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Professional Jakarta Struts section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old February 4th, 2004, 01:02 PM
Registered User
 
Join Date: Feb 2004
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Struts database connection how?

Hello everybody,

How to connect a ms access db or db2 in struts.
i am using the server WSAD 5.1
Struts 1.1



 
Old January 10th, 2005, 01:47 PM
Authorized User
 
Join Date: Oct 2004
Posts: 14
Thanks: 0
Thanked 0 Times in 0 Posts
Default

In your file struts-config.xml the data connection for MS Access looks liek this...

Code:
      
      <data-source type="org.apache.commons.dbcp.BasicDataSource">
        <set-property property="key" value="Access_1" />  
        <set-property property="driverClassName" value="sun.jdbc.odbc.JdbcOdbcDriver" />  
        <set-property property="url" value="jdbc:odbc:Driver={Microsoft Access Driver (*.mdb)};DBQ='drive_letter:/full_path/file_name.mdb'" />
        <set-property property="username" value="" /> 
        <set-property property="password" value="" /> 
      </data-source>





Similar Threads
Thread Thread Starter Forum Replies Last Post
Database Access in Struts sunu BOOK: Professional Jakarta Struts 4 November 20th, 2006 08:32 AM
Connecting to oracle database in struts Manvi Struts 3 August 7th, 2006 10:53 PM
login screen in struts and mysql database [email protected] Struts 1 May 4th, 2006 09:07 AM
struts with database rajkumares Servlets 0 October 12th, 2004 12:21 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.