loading jdbc Driver in servlet

From: Rob Sargent <robjsargent(at)gmail(dot)com>
To: "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: loading jdbc Driver in servlet
Date: 2018-12-14 18:28:59
Message-ID: 5182a498-cfde-e7a3-998d-fea79bedaf35@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Dave Cramer 2018-12-14 20:30:04 Re: loading jdbc Driver in servlet
Previous Message Oleg 2018-12-14 12:09:19 Re: libpq PQexecParams & value placeholders