File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Struts and the fly likes is Action getDataSource method removed from Struts 1.2.9 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "is Action getDataSource method removed from Struts 1.2.9" Watch "is Action getDataSource method removed from Struts 1.2.9" New topic
Author

is Action getDataSource method removed from Struts 1.2.9

Hongjun Zhang
Greenhorn

Joined: Feb 28, 2003
Posts: 3
Does anybody know whether Action.getDataSource is removed from Struts 1.2.9?
Checked the API doc on apache web site and couldn't see this method anymore. But 1.2.9 struts.jar file seems still support this method. Does anyone know what's going on? Thanks.


Hongjun Zhang<br />SCJP, SCJD, SCWCD, SCBCD
Merrill Higginson
Ranch Hand

Joined: Feb 15, 2005
Posts: 4864
For a long time the authors of Struts have indicated that the datasource functions included with Struts are a "last resort" in case your Application server doesn't support data sources very well. Since now any application server that's worth anything at all has good support for data sources, the authors of Struts have deprecated the Struts data source API.

The best practice is (and for a long time has been) to define datasources using whatever method your App Server recommends, and then to access them in your code with a JNDI lookup.


Merrill
Consultant, Sima Solutions
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: is Action getDataSource method removed from Struts 1.2.9
 
Similar Threads
Problem with File Upload
Is Struts 1.2.9 Struts1 or Struts2
How to retain search results
how to highlight error field in struts html form?
query regarding locale in struts