Unable to determine what is the best way to connect to mysql database in struts..
- We can always use
DriverManger
andClass.forName()
to connect. DataSource
interface - but this has problems I am getting compliation error forDataSource dataSource = (DataSource)context.getAttribute(Globals.DATA_SOURCE_KEY); or when
Action.Data_SOURCE_KEY
is used. when searched I found that these variables are depricated.
How can I use connection pooling in struts?What is best place to place url,username,pass for database?DO i still have to use datasource configuration in same way in struts-config? Then why was this facility depricated?
Too many queastions but I cannot find a definite source to learn struts. Struts doc can be but then revisions and backword compatibility are the issues which a learner cannot get easily... Pls suggest a good source to learn struts2.