GenericDataSource vs BasicDataSource
Hi,
I have the Beginning JSP Web Development (2001) and I am trying to implement DBInitservlet on page 640.
It is suggested by the new struts library to swap GenericDataSource with
Basic DataSource.
How exactly am I to do that? I have obviously imported the commons library but for example there is no .open() function in the BasicDataSource class. Therefore the try->catch statement does not work since no SQLException is thrown. (just to compile I have removed the try catch and I have adopted the setters in order to fetch the init parameters but I dont know if it works with no .open() function)
By the way, this chapter is really excellent! I want to stick to it till the end of the example and I am stuck with this deprication.
Any help will be much appreciated,
Ioannis
|