wood burning stoves 2.0*
The moose likes JSP and the fly likes Accessing database through JSP Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "Accessing database through JSP" Watch "Accessing database through JSP" New topic
Author

Accessing database through JSP

RaviSingh Kumar
Ranch Hand

Joined: Sep 04, 2007
Posts: 52
Hi,

I had written java program to establish a connection to the database(Oracle 10g) and using it through Swing application.But getting problem with JSP.
I just want to know that how the above java file is used through JSP.
I had already copied the classes12.jar file to ext\lib folder under java directory and also under tomcat dir.

Please help in this regards

thanks
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41144
    
  45
But getting problem with JSP

What does this mean? If there is an error message, tell us what it is.


Ping & DNS - my free Android networking tools app
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

I had already copied the classes12.jar file to ext\lib folder under java directory and also under tomcat dir.



Putting in in the Java and/or Tomcat directory will not help.
It needs to be in a specific place within either the tomcat directory structure or within your application. Which depends on how you are trying to connect to the database.

Show us your code for connecting to the database and we can point you in the right direction.


Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
kelby zorgdrager
Greenhorn

Joined: Feb 05, 2008
Posts: 12
i am assuming you get a ClassNotFoundException? if so, the lib\ext should work. remember if you are on windows, there is a jre\lib\ext where the jre is installed and there is another one where the JDK is installed. make sure your JAVA_HOME is set in the catalina.bat to point to the *correct* lib\ext.


<a href="http://www.J2EETraining.com" target="_blank" rel="nofollow">J2EE Training / Java EE Training ... Learn Java EE </a>
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Accessing database through JSP
 
Similar Threads
How to store/retrieve Image file through JSP
Calling java classes from jsp
How to retrive img from database through jsp
XML data collection
Running JSP on Java Web server