struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From BinhMinh Nguyen <struts_informat...@yahoo.com>
Subject Re: how to define a datasource in struts?
Date Tue, 21 Aug 2001 16:17:52 GMT
Here it is. Hope it helps.
in struts-config:

<struts-config>
  <data-sources>
          <data-source>
             <set-property property="key"  	 
value="PrePopulateDS"/>
             <set-property property="autoCommit" 
value="false"/>
             <set-property property="description"
value="FN Data Source Configuration"/>
             <set-property property="driverClass"
value="oracle.jdbc.driver.OracleDriver"/>
             <set-property property="maxCount"   
value="4"/>
             <set-property property="minCount"   
value="2"/>
             <set-property property="password"   
value="furnnet"/>
             <set-property property="user"       
value="furnnet"/>
             <set-property property="url"        
value="jdbc:oracle:thin:@localhost:1521:furnnet"/>    
                                               
          </data-source>
  </data-sources>


in java code:

fnDataSource =
(DataSource)(getServlet().getServletContext().getAttribute(Action.DATA_SOURCE_KEY));



Binh Minh Nguyen

--- Satyan Nair <satyan@cobite.com> wrote:



> Hi everyone,
> i m new to struts.. if anyone can tell me where to
> find the archive of the
> mailing lists then the problems already discussed
> won't come again and
> again...
> anyway i would like to know how to define datasource
> in struts... i tried
> using the example given with struts... but i must be
> missing something to be
> configured.. i configured the struts-config.xml
> file... for defining the
> datasource... but it gives me ActionMapping
> errors...
> 
> take care everyone
> 


__________________________________________________
Do You Yahoo!?
Make international calls for as low as $.04/minute with Yahoo! Messenger
http://phonecard.yahoo.com/

Mime
View raw message