You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Divya B Sridhar <di...@cisco.com> on 2003/12/04 14:33:23 UTC

Database with struts

Hi all,
I am trying to do a database connectivity using struts.
Actually, the database resides on another machine and I have tomcat
running on my local machine.
The other machine is a linux box(a linux machine) which has the database
installed(PostgreSQL).
So, apart from the <data-sources> tags to be specified in the
struts-config.xml file, the Action class containing the Connection and
the queries, what other configuration is required. Any ideas on this?(I
mean to ask the other steps required in order that a simple sample
database example with struts works - drivers etc. Any input is welcome)
Thanks in advance,
 
Regards,
Divya.

Re: Database with struts

Posted by virupaksha <vi...@hotmail.com>.
hi,

I too have same setup like you,
You can use JNDI to locate datasource, configure your datasource in tomcat's
server.xml,
and write your JNDI code in your bean. it will be easy & better way :)

regards,
Virupaksha





----- Original Message -----
From: "Vic Cekvenich" <ce...@basebeans.com>
To: <st...@jakarta.apache.org>
Sent: Friday, December 05, 2003 4:24 AM
Subject: Re: Database with struts


> I disagree.
> DataSource should not be used, you should use a DAO, for example
iBatis.com.
>
> .V
>
> Gurpreet Dhanoa wrote:
> > hi
> >
> > You have to Configure DataSource and then u can get the refernce of the
same
> > it in the ACtion and can use it
> >
> > Regards
> > gary
> > ----- Original Message -----
> > From: "Divya B Sridhar" <di...@cisco.com>
> > To: <St...@jakarta.apache.org>
> > Sent: Thursday, December 04, 2003 7:03 PM
> > Subject: Database with struts
> >
> >
> >
> >>Hi all,
> >>I am trying to do a database connectivity using struts.
> >>Actually, the database resides on another machine and I have tomcat
> >>running on my local machine.
> >>The other machine is a linux box(a linux machine) which has the database
> >>installed(PostgreSQL).
> >>So, apart from the <data-sources> tags to be specified in the
> >>struts-config.xml file, the Action class containing the Connection and
> >>the queries, what other configuration is required. Any ideas on this?(I
> >>mean to ask the other steps required in order that a simple sample
> >>database example with struts works - drivers etc. Any input is welcome)
> >>Thanks in advance,
> >>
> >>Regards,
> >>Divya.
> >>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org
>
>

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


Re: Database with struts

Posted by Vic Cekvenich <ce...@basebeans.com>.
I disagree.
DataSource should not be used, you should use a DAO, for example iBatis.com.

.V

Gurpreet Dhanoa wrote:
> hi
> 
> You have to Configure DataSource and then u can get the refernce of the same
> it in the ACtion and can use it
> 
> Regards
> gary
> ----- Original Message -----
> From: "Divya B Sridhar" <di...@cisco.com>
> To: <St...@jakarta.apache.org>
> Sent: Thursday, December 04, 2003 7:03 PM
> Subject: Database with struts
> 
> 
> 
>>Hi all,
>>I am trying to do a database connectivity using struts.
>>Actually, the database resides on another machine and I have tomcat
>>running on my local machine.
>>The other machine is a linux box(a linux machine) which has the database
>>installed(PostgreSQL).
>>So, apart from the <data-sources> tags to be specified in the
>>struts-config.xml file, the Action class containing the Connection and
>>the queries, what other configuration is required. Any ideas on this?(I
>>mean to ask the other steps required in order that a simple sample
>>database example with struts works - drivers etc. Any input is welcome)
>>Thanks in advance,
>>
>>Regards,
>>Divya.
>>



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


Re: Database with struts

Posted by Gurpreet Dhanoa <gu...@smartdatainc.com>.
hi

You have to Configure DataSource and then u can get the refernce of the same
it in the ACtion and can use it

Regards
gary
----- Original Message -----
From: "Divya B Sridhar" <di...@cisco.com>
To: <St...@jakarta.apache.org>
Sent: Thursday, December 04, 2003 7:03 PM
Subject: Database with struts


> Hi all,
> I am trying to do a database connectivity using struts.
> Actually, the database resides on another machine and I have tomcat
> running on my local machine.
> The other machine is a linux box(a linux machine) which has the database
> installed(PostgreSQL).
> So, apart from the <data-sources> tags to be specified in the
> struts-config.xml file, the Action class containing the Connection and
> the queries, what other configuration is required. Any ideas on this?(I
> mean to ask the other steps required in order that a simple sample
> database example with struts works - drivers etc. Any input is welcome)
> Thanks in advance,
>
> Regards,
> Divya.
>


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


Re: Database with struts

Posted by Markus <ma...@gmx.com>.
Hi,
follow this link:

http://sourceforge.net/projects/struts/

Regards,

Markus


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