Re: loading jdbc Driver in servlet - Mailing list pgsql-general

From Dave Cramer
Subject Re: loading jdbc Driver in servlet
Date
Msg-id CADK3HH+OHFy5HgrfhW1fBebkkGODpt8v+bGPm4pC3WYxJUq8Yg@mail.gmail.com
Whole thread Raw
In response to loading jdbc Driver in servlet  (Rob Sargent <robjsargent@gmail.com>)
Responses Re: loading jdbc Driver in servlet
List pgsql-general
Strange, I wouldn't think so, but then I haven't used a raw servlet for so long I have no idea.


On Fri, 14 Dec 2018 at 13:29, Rob Sargent <robjsargent@gmail.com> wrote:

Using java 1.8, postgresql-42.1.4.jar, embedded tomcat 9

It appears to me that I need to make the call "Class.forName("org.postgresql.Driver)" when the entry is in a servlet.  Is this expected, within a servlet, or is this just post hoc ergo propter hoc at it finest and I changed something else (wittingly or not).  Same code outside of servlet does not need the forced loading of the class and the manual claims it's not need after java 1.6

pgsql-general by date:

Previous
From: Rob Sargent
Date:
Subject: loading jdbc Driver in servlet
Next
From: Rob Sargent
Date:
Subject: Re: loading jdbc Driver in servlet