struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Arash Ramin" <ar...@digitalroom.net>
Subject RE: database conection information location - best place?
Date Wed, 23 Jan 2002 15:29:53 GMT
> Right now I have my database connection (jdbc-odbc bridge) information
> hardcoded into my java classes. I would like to keep this information
> strored outside of .java or .jsp files.

You can define a data source in struts-config.xml:

  <data-sources>
    <data-source
       autoCommit="true"
      description="ODBC data source"
      driverClass="sun.jdbc.odbc.JdbcOdbcDriver"
         maxCount="5"
         minCount="1"
         password="pass"
              url="jdbc:odbc:dsname"
             user="login"
    />
  </data-sources>

Info. on accessing it is in the struts user guide.

Arash
www.digitalroom.net


--
To unsubscribe, e-mail:   <mailto:struts-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:struts-user-help@jakarta.apache.org>


Mime
View raw message