Latest Tutorials| Questions and Answers|Ask Questions?|Site Map



Home Answers Viewqa JSP-Servlet connecting servlet to db2
Login         

View Questions and Answers by Category

Advertisements


 
Have Programming Question? Ask it here!
 
 
 


vidyasagar
connecting servlet to db2
1 Answer(s)      6 years and 3 months ago
Posted in : JSP-Servlet



Advertisement
View Answers

October 6, 2008 at 8:54 PM


If u are using the oracle Database 9i(connect from servlet)
1)first u have to load the drivers.
2)Get the connection to the DataBase.
3)In this process first you have to set the classpath for oracle9i ie classes111.jar file in the classpath.
4)copy the abou said jar file in lib folder along with servlet-api.jar and jsp-api.jar files.

for example code like this if u are using the oracle type4(thin) driver:
import java.sql.*;

Class.forName("oracle.jdbc.driver.OracleDriver");

Connection con=DriverManager.getConnection("jdbc:oracle:thin:@localhost:serviceid","scott","tiger");
5)to know the serviceid use type this command in oracle9i ie
select * from global_name;
the first word in this name is service id otherwise to search for tnsNames.ora file in oracle software after installation. I think it is in jdbc folder.



Related Tutorials/Questions & Answers:
connecting servlet to db2 - JSP-Servlet
connecting servlet to db2  Hello sir, Iam new to db2.so I would like to know the procedure to connect to db2 from a servlet or jsp.Also Tell me the configuration we need to be done before connecting to the db2(such as what path
DB2
DB2  Actually i want to store Live Video Streaming(from Camera) in data base(DB2) & also i want to retrieve the stored video from client(Authorized Person). So Please send me the java code for above functions
Advertisements
connecting jsp to mysql - JSP-Servlet
connecting jsp to mysql  Hi, i am working on 'Web application development' project that uses JSP, MySQL and tomcat.i am not able to connect to the mysql database through jsp. After downloading the mysql-connector-java-5.0  
connecting to a database dynamically - JSP-Servlet
connecting to a database dynamically   abc.html :- abc.jsp :- Above code gives the following exceptions :- type Exception report message description The server
jsp connection to db2
jsp connection to db2  hello friends i have a project to do in jsp using db2 database can anyone please help me in connecting a jsp page to db2 database?? please frienda help me
Connecting to Database from a hyperlink in JSP - JSP-Servlet
Connecting to Database from a hyperlink in JSP  How can I connect to database by clicking on a hyperlink in a JSP Page.Can you please give me sample code for that? Thanks, Srinivasa Rao  Hi friend, insert code
Hibernate db2
In this section, you will learn about the db2 configuration in Hibernate
DB2 - Development process
DB2  Actually I am participating in IBM's greatming challenges competition. I am using IBM's DB2 for database purpose. I don't know how to connect to database(DB2) from jsp application.I am using eclipse as an IDE. I am
Need a query to run in db2
Need a query to run in db2  hi all, I need a query to run in DB2 for the following: Table 1- MARKETINGACCOUNTS Fields-ACCOUNTTYPE,Accountnumber; Table 2- ACCOUNTS Fields-LEDGERCODE,ACCOUNTNUMBER,BALANCE FROM THE ABOVE I NEED
connecting databases
connecting databases  I need to connect mysql on 2 or more remote pc'c. how can i giv the ip address for 2 or more systems. is it possible to connect to the required systems by user specifying the database and table name my
Null pointer exceptation-Java Servlet web application,Problem connecting with MYSQL database
Null pointer exceptation-Java Servlet web application,Problem connecting with MYSQL database  Hi everyone i would like to ask few question here,since i try to configure this out for 1 week,i dont find any solution for my problem
storing images in directory,saving path in db2
storing images in directory,saving path in db2  i am working in a web... in a folder and its path(relative/absolute) in my DB2 database. and when.... can you help?? i'm using DB2 databse Linux(fedora 13) environment
connecting to timesten in web application
connecting to timesten in web application  Please give me the steps connecting to timesten in web application. Am using jsp
XML to DB2 Comparison using Java xpath
XML to DB2 Comparison using Java xpath  Hi , I am a manual tester by profession , i have a huge xmls file (1 GB) containing product details of 'n' products . i want to compare these xml values with db2 using Java. I have Good
Connecting to a database through the Proxy.
Connecting to a database through the Proxy.  Connecting to a database through the Proxy I want to connect to remote database using a program that is running in the local network behind the proxy. Is that possible
java connecting frames
java connecting frames  how to connect one frame to another frame by using awt or swings?`print("code sample
connecting with database - Struts
connecting with database  I am creating an application where when jsp page is displayed, it contains the combo box where data is populated from the database.it has 3 buttons and the functionality for all buttons is different
Connecting code of reset password to database
Connecting code of reset password to database  connecting code of reset password to database
Connecting to Hardware - Java Beginners
Connecting to Hardware  I'm currently using netbean for my Final Year Project system that involve some hardware like electronic weighihng scale. Can you please provide me at least the idea if not the coding on how the system can
connecting to database - Struts
connecting to database  Hi I am having problems with connection to MS SQL Server 2005 database. My first is what do i write in struts-configuration.xml file that enable me to use methods in the model class to display
Connecting to MYSQL Database in Java
Connecting to MYSQL Database in Java  I've tried executing the code below but the error that I get is "Error: com.mysql.jdbc.Driver" I downloaded the connection driver and configured the class path but the error persists. Please
java connecting to oracle db
java connecting to oracle db  PLZ SAY ME HOW TO INSERT THE VALUES INTO ORACLE THIS IS THE CODE: import java.io.*; import java.sql.*; import java.awt.*; import javax.swing.*; import java.awt.event.*; import
Connecting JTable to database - JDBC
Connecting JTable to database  Hi.. I am doing a project on Project Management System for which i created the user interfaces.. I have a user interface in which i have used JTables.. Now my problem is I dont know how to how
connecting to access database
connecting to access database  print("code sample");Hi I Write java projrame in notepad,I use 3 notepad pages to write this program,when i run this there is no error but my data is not going to my Acess Database. There is working
Connecting Oracle database with struts - Struts
Connecting Oracle database with struts  Can anyone please provide me some solutions on Connection between Oracle database and struts
jsp -sevlet connecting to database using dropdown
jsp -sevlet connecting to database using dropdown  How can I get my... am thinking of a form that links to a servlet and the servlet connects... to a servlet which then inserts to the database. someone please give me some sample
Connecting to Unix through Java - JavaMail
Connecting to Unix through Java  Could you please tell a sample code, where i connect to the unix server and run a script and write the results in a file and mail that file back to me
Connecting jboss with sql 2005 - Struts
Connecting jboss with sql 2005  Hai, i have project that was developed in struts,backed is sqlserver 2005 and and i am using jboss. I want to connect another database (sqlserver 2005) with my project.could u please help me
Problems connecting to a database. Java/SQLite
Problems connecting to a database. Java/SQLite  `print("try { con = DriverManager.getConnection("jdbc:sqlite:db/Freepark.sqlite"); } catch... on an SQL database but i am having problems connecting to it, I think the problem
problem in connecting clients - Development process
problem in connecting clients   i had coded programe to establish the lan based chat application but the server listening to only one client at a time it not receiving the messages form allclients would tell me the solution  
java jdbc connecting probelm - JDBC
java jdbc connecting probelm  import javax.servlet.*; import javax.servlet.http.*; import javax.sql.*; import java.io.*; public class ECom extends HttpServlet { String name,pass; public void doPost
Advertisements
 

 

 

DMCA.com