You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by "joe a." <ew...@gmail.com> on 2004/10/01 20:04:24 UTC

xml as a datasource?

I am in need of a document covering how to use xml as a data source
with struts.  If someone could post a link I would appreciate it. 
Also, what are the benefits to using xml as a datasource instead of a
db like mysql?

Thanks,
Joe

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


Re: xml as a datasource?

Posted by Wendy Smoak <ja...@wendysmoak.com>.
From: "joe a." <ew...@gmail.com>
> I am in need of a document covering how to use xml as a data source
> with struts.  If someone could post a link I would appreciate it.
> Also, what are the benefits to using xml as a datasource instead of a
> db like mysql?

I don't know that I'd do it in a production site of any size, but I believe
the struts-example webapp uses an XML file for it's user database.

IMO the Struts code shouldn't know where the data is... it should just call
methods on data access objects and get the objects it needs in return.  I
use the J2EE BluePrints DAO pattern because my database isn't one where JDBC
makes sense.  But I could easily replace the underlying datastore with
something else, and never make a change in the Action code.

-- 
Wendy Smoak


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