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



Home Answers Viewqa JSP-Servlet connecting servlet to db2

Have Programming Question? Ask it here!
 
 
 


vidyasagar
connecting servlet to db2
1 Answer(s)      5 years and 10 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 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 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 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
doubt in connecting mysql in flex - XML
doubt in connecting mysql in flex  The ?Create application from database? is a Flex 3 feature that enable you to create simple applications in few clicks;Here is an example whichusephp as back-end and MySql as DataSource:First
doubt in connecting to mysql in flex - XML
doubt in connecting to mysql in flex  The ?Create application from database? is a Flex 3 feature that enable you to create simple applications in few clicks;Here is an example whichusephp as back-end and MySql as DataSource:First
java connecting to oracle db - JDBC
java connecting to oracle db  how to connect oracle data base with java application?  Hi Friend, Follow these steps: 1) Import the following packages in your java file:*********** import java.sql.*; import
code for connecting reset password code to database.
code for connecting reset password code to database.  code for connecting reset password code to database.   Hello Friend, Do you want to change your password and update the password to database
servlet and jsp
servlet and jsp  how to connect an jsp and an servlet without connecting to database
Connecting to remote mysql server using jdbc.
Connecting to remote mysql server using jdbc.  How to Connect to remote mysql server using jdbc
Connecting different Servers - Java Server Faces Questions
Connecting different Servers  How can i connect two different tomcat server in an application
DB2 Universal claims to support JDBC 2.0, But I can only get JDBC 1.0 functionality.
DB2 Universal claims to support JDBC 2.0, But I can only get JDBC 1.0 functionality.  DB2 Universal claims to support JDBC 2.0, But I can only get JDBC 1.0 functionality. What can I do
IBM Cloudscape Workbench
;  The Cloudscape Workbench is a tool for connecting to Derby and DB2 databases, and performing common tasks such as browsing schemas... also enables easy migration from a Derby database to a DB2 database
connecting to ssh using ir00co and postgres - Struts
connecting to ssh using ir00co and postgres  how can i connect to this servers after i succesfully login in the ldap?will i open new connection?any advice will be appreciated... ebok
java code for threading example for connecting data base
java code for threading example for connecting data base  Write a program that has two threads First thread queries the database and fetches all the employee records from the emp table. Stores the employee objects
writing querries qnd connecting for insertion, accessing....
writing querries qnd connecting for insertion, accessing....  i created my front ends using html, and my back end using oracle 10g, i dont know how to connect and where to write querries and how to insert and access the data
Connecting to the Database Using JDBC and Pure Java driver
Connecting to the Database JDBC Driver In our search... for connecting our application to the database. MM.MySQL Driver... encoding. Connecting
how to send emails to many using jsp by connecting to ms access dabase.
how to send emails to many using jsp by connecting to ms access dabase.  Hi. I am trying to send multiple emails and the email ids are stored in a table in a msaccess database.I am using jsp for this.And finally there should
how to draw a network with nodes and lines connecting them - Java Beginners
how to draw a network with nodes and lines connecting them   HI, can anyone tell me, how to draw a network with nodes connected with lines in java....( say for 3 nodes). Actually iam doing a project. In that, i need to show
Encountering error when connecting MSSQL Server 2005 using Hibernate 3.0
Encountering error when connecting MSSQL Server 2005 using Hibernate 3.0  Hi, Im a beginner to the hibernate framework.Im encountering the following error when connecting to the MSSQLServer 2005 using hibernate 3.0 My
Eclipse Plunging-Database
is a free tool for connecting to Derby and DB2 databases, and performing common... database to a DB2 database.    Database editor for point base... image, and adds support for Oracle, DB2 and MS SQL Server.   
Servlet
Servlet  What is Servlet
Connecting to MySQL database and retrieving and displaying data in JSP page
Connecting to MySQL database and retrieving and displaying data in JSP page      ...;org.gjt.mm.mysql.Driver").newInstance(); Connecting to your database To connect
Advertisements
 

 

 

DMCA.com