That is not how the classpath works, you need to reference specific jars (and normally you should NOT put third party jars inside the JDK folder).
Oracle Jdbc Ojdbc5.Jar Driver Is ToThe normal way to use a JDBC driver is to have the driver on the application classpath, and simply specify the right driver URL.Oracle Jdbc Ojdbc5.Jar Drivers Will BeJDBC 4.0 (Java 6) or higher compliant drivers will be automatically loaded from the classpath (as specified with -cp, the Class-Path manifest entry etc).Just a hint: you usually define a DataSource in the application server, request it through JNDI (or dependency injection) and get a Connection from it; in that case the driver is placed in the classpath of the application server itself, not of the web app.
If you really need it in the webapp without a DataSource, it needs to be in the WEB-INFlib folder of the application. Also, it usually is a designarchitecture smell when a database is queried directly on a JSP. ![]() For example, if youve copied it into the lib directory relative to your application, you could use. Oracle Jdbc Ojdbc5.Jar Driver In ItI extracted ojdbc5.jar and then i copied oracle folder in extracted ojdbc5.jar and then pasted in current location where i wrote jdbc program ( not mentioning the directory as it differs from programmer to programmer), then used import oracle.jdbc.; statement in my jdbc program as oracle.jdbc has OracleDriver in it. Provide details and share your research But avoid Asking for help, clarification, or responding to other answers. Making statements based on opinion; back them up with references or personal experience.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |