Struts stores DataSources defined in struts-config.xml in the ServletContext so any class can access them. A more common approach is to define your DataSource in JNDI and have your business objects look it up from there. Both ways allow for MVC and the Struts configuration is provided as a convenience.

David


I have been reading all over the place and can't seem to find a simple answer to my question. In struts using MVC development what is the best method to connect to a database. In struts 1.1rc1 you can specify DataSources but to my understanding you can only access this datasource from within the subclasses of the Action class. Using MVC I don't see how this could be helpful because you couldn't use the Struts datasource in the Data Access Object Beans. I would love to hear all of the ideas everybody has about this and examples if possible. I greatly appreciate it.

Regards,
Sloan

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


_________________________________________________________________
STOP MORE SPAM with the new MSN 8 and get 2 months FREE* http://join.msn.com/?page=features/junkmail



--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to