Connect to ORACLE with JSP

I need to connect to a Oracle 9i Database using JSP; i need 2 connections:
1 for TOMCAT running in Windows and 1 for Apache running in UNIX
anyone? i need this code as soon as posible
T

Can't help you with the Apache side, but Tomcat is easy enough if you know Java and JDBC.
Tomcat has excellent docs on how to set up a JNDI data source:
http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jndi-datasource-examples-howto.html
If you need help with JDBC, look at the JDBC tutorial:
http://java.sun.com/docs/books/tutorial/jdbc/index.html
Neither I nor anyone else is going to write this code for you, no matter how urgent your need. - MOD

Similar Messages

  • Hi guys Pls tell me a way to connect db4 database with jsp and which driver

    hi guys
    Pls tell me a way to connect db4 database with jsp and
    also tell me which driver i have to use
    also tell me how to connect with excel sheets

    take a look at the follwing links. There, you'll find all what you need :
    DB4:
    http://www.oracle.com/database/berkeley-db/je/index.html
    http://www.oracle.com/technology/products/berkeley-db/je/index.html
    http://www.oracle.com/database/berkeley-db/db/index.html
    http://www.oracle.com/database/docs/berkeley-db-je-datasheet.pdf
    Excel:
    http://64.18.163.122/rgagnon/javadetails/java-0516.html
    Hope That Helps

  • How to connect MySql database with JSP

    Dear everyone,
    how to connect MySql database with JSP......

    It's too bad that nobody has ever asked this question before...

  • Trying to simply connect to Oracle with VBscript/ASP - and I cannot.

    This is rather embarrassing. I am pretty fluent with ASP and VBscript, and I have written many a web application connecting to Microsoft SQL Server. Now I have a need to connect to an Oracle database, and I'm beating my head against the wall.
    1) Web server is Windows Server 2003 SP1
    2) Using ASP (not ASP.NET) & VBscript
    3) I have installed the Oracle drivers on the server - it is version 10g
    4) The administrator of the Oracle database to which I want to connect has created a username and password for me to use from within my code
    5) Here is the code I am trying to run:
    Set objConn = Server.CreateObject("ADODB.Connection")
    objConn.Open "Provider=MSDAORA;Data Source=XXXXXXX;User Id=YYYYYYY;Password=ZZZZZZZ;"
    That's it. 2 lines of code just trying to establish a connection. Using the user name and password provided to me by the administrator, and for Data Source I am using the IP address of the Oracle server (like I have done in the past when connecting to SQL Server). I receive the following error message when viewing this in a browser:
    Microsoft OLE DB Provider for Oracle error '80004005'
    ORA-12154: TNS:could not resolve the connect identifier specified
    Evidently, the Data Source I am using is not correct, but I was provided no other information from the admin. This is the first time any of us have tried to connect to Oracle using ASP/VBScript, so the administrator isn't sure what I need to do ... any help would be so appreciated.

    Hello,
    I got mine to work by setting up an ODBC System DSN and connecting to it. I think this bypasses the Microsoft driver, which might be what's causing the problem.
    Set Db = Server.CreateObject("ADODB.Connection")
    Db.Open "DSN=TEST;User ID=userid;Password=password;"
    Good luck, I've found it requires a lot of persistence...
    Al
    Springfield, MO

  • Error with Connection to Oracle with Wallet , JDBC, and UNIX

    Hello - our application has been getting this error periodically while connecting to an oracle database using OCI JDBC drivers.
    caused by: java.sql.SQLException: ORA-28759: failure to open file
    at oracle.jdbc.driver.DatabaseError.throwsSqlException(DatabaseError.java:125)
    at oracle.jdbc.driver.T2CConnection.checkError(T2CConnection.java:681)
    at oracle.jdbc.driver.T2CConennection.logon(T2CConnection.java :362)
    at oracle.jdbc.driver.PhysicalConnection.<init>
    at oracle.jdbc.driver.T2CConnection.<init>
    at oracle.jdbc.driver.T2CDriverExtension.getConnection
    at oracle.jdbc.driver.OracleDriver.connect
    at java.sql.DriverManager.getConnection
    at java.sql.DriverManager.getConnection
    Once we get this error we keep getting it and are unable to get a connection until we restart it. the file it has the issue with is the cwallet.sso, which I figured out by turning on tracing. The file is there and it gets the connection originally - but for some reason periodically we lose access to that file. But when we get the error the file is there and when we restart the process it's perfectly fine.
    The only way we have been able to replicate this error is by create a sameple JAVA app which just keeps opening connections to the database with the wallet without closing the connections. Everytime we hit the 50th connection that error appears and it's unable to get another connection. If we close the connections everytime it's alright.
    It's not a limit on the amount of connections to oracle because we have no limit set. The best explaination we can find is that unix has some sort of limit on how many concurrent accesses to that file can be done within one process. We have been unable to figure out that limit. We tried playing around with the file descriptor limits to see if it gets more or less then 50, but no luck.
    If anyone has any other suggestions it would be greatly appreciated - we are stuck right now.
    Thanks!

    No suggestions?

  • How do I connect to Oracle with JDBC using "dedicated processor".

    Because of performance problems we want to try to connect to
    oracle using dedicated processor. We can do this from SQL Plus,
    does anybody know what we need to set up in order to utilize
    this from JDBC?

    Which Java runtime error? (stack trace?)

  • How to connect Oracle with Jsp?

    Hi,
    I am student and I am trying to use Jsp to connect oracle. Do you have any sample to show how to do it?
    Thanks a lot.
    Amy

    In JSP, you connect to the Oracle in a same way as you would do it in any Java application, using JDBC. Please refer to Java Tutorial -> JDBC on sun site and you will get easy and straight forward concepts.

  • Cannot connect to Oracle with ASP

    I'm having problems connecting to an Oracle database in ASP. I am using the following code:
    Inc_ConnString = "Provider=OraOLEDB.Oracle;Data Source=my_db;" & _
              "User Id=user_name;Password=password"
    Set DBconn = Server.CreateObject("ADODB.Connection")
    DBconn.Open Inc_ConnString
    I am always getting the following error message:
    ADODB.Connection (0x800A0E7A)
    Provider cannot be found. It may not be properly installed.
    However, when I run the Visual Basic sample code, everything works fine.. with the same code. I have downloaded and installed the latests Oracle Provider for OLE DB, Oracle ODBC Drivers, Oracle Objects for OLE from www.oracle.com.. but I am still getting this error message..
    Any pointers?

    Give the IWAM_XXXX User full NTFS access rights to your %ORACLE_HOME%, ie. C:\oracle\ora92 and all subdirectories (this is documented in Metalink Doc-ID 258471.995).
    g

  • Error when Connect to Oracle using JSP

    DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver()); There is no problem with this code in Java, but when i used it in JSP, the error occured.
    java.lang.ClassNotFoundException: oracle.jdbc.OracleDriver
    I am using JRUN Web Server, i don't know how to Configure JRUN to use JSP with Oracle.

    the problem is that your JDBC driver is not in the classpath of your servlet. Add the jar file to the WEB-INF\lib folder of your web application.
    i don't know how to Configure JRUNSorry, but in order to achieve anything, you'll have to RTFM.

  • I can not establish a connection to Oracle with an application in win 7

    I have an application in VB6 that connects to an Oracle Database 10g with Oracle native ole db but win7 can not make the connection with a standard user, only makes the connection to a user with administrator permissions. The error that shows the application's rubbish eg @, H, etc.. only rare characters.
    Edited by: gualja on 11/01/2013 04:13 PM

    Did you try adding the user in administrator group and running your programm, even doing so is giving you same error?
    Can you connect to sqlplus as non admin user and fire sql commands
    start>run>sqlplus (if you have more than one installation, run from your oracle_home/bin)
    connect as the non admin user and run sql
    if the "User Account Control is enabled", try disabling

  • Need help in connecting to JNDI with JSP

    Hi all
    I am working on LDAP with JNDI, i need to use JSP for front end screens.
    My problem is like this..
    I am not finding a way to pass a user name and password from my jsp file, through JNDI and check for authentication in an LDAP server.
    I am using iPlanet Directory Server as my LDAP server, i have added some users using a JNDI class, and a default password is set for them.
    All I need to do is to authenticate the user for LDAP and return a boolean value to the jsp page and then proceed for further operations.
    I would be thankful if anyone could help me solve this problem, urgent...........
    Thanks
    Swaraj

    Hi
    One way to do this would be:
    1. Write a sample program which will read the username & password as command line parameters. This will authenticate this data against the LDAP server that you have setup. Once you have this working proceed to step2.
    2. Write a Java Bean with two attributes that will hold the username and password. Add a method authenticate user which will contain the code you have written in step 1.
    3. Create a JSP with username & password fields. Let the form post to the same JSP or a different JSP/Servlet.
    4. In the JSP use the <jsp:useBean> tag to create a bean coded in Step 2. The scope bean should be "request". Set the username and password fields using the <jsp:setProperty> tag. Once you have this , just use the beanId from the <jsp:useBean> tag to call the validation method.
    Keep me posted on your progress.
    Good Luck!
    Eshwar Rao
    Developer Technical Support
    Sun microsystems inc.
    http://www.sun.com/developers/support

  • Connect db oracle with applet

    My problem is the connection between applet and db oracle that it resides in another host of the web server.
    Security problem address to me to I use oracle connection manager.
    cman.ora is so shaped:
    cman = (ADDRESS_LIST=
    (ADDRESS=(PROTOCOL=tcp)(HOST=192.168.20.14)(PORT=1630)(QUEUESIZE=32))
    while the db connection is:
    "jdbc:oracle:thin:@(description=(address_list= " +
    "(address=(protocol=tcp)(port=1630)(host=192.168.20.14))"+
    "(address=(protocol=tcp)(port=1521)(host=192.168.40.14)))" +
    "(connect_data=(sid=dbbackup))"
    but occurs the error :
    java.sql.SQLException: Eccezione IO: Connection reset
    WHY?
    thank's all

    Hi,
    You should avoid connecting to a database from an applet. The applet should instead connect to a server process, which has a database connetion (or a pool of connections)
    /Kaj

  • How can i connect personnal oracle with Developer/2000

    hello,all
    First i Install Personnel oracle and then I install
    Developer/2000 in a different Oracle home.Now plz tell me wat
    should i do to connect these two.Plz write in detail.
    thank you ahead.

    Update the tnsnames.ora file in the ORACLE_HOME directory where you installed your Designer/2000.

  • PHP4: connect to oracle with ORA-12546 error

    I have install the PHP4 + apache 1.3.12 on redhat 6.2, by recompile the apache and php packages.
    Fortunately, the apache can startup. But when I run the program as below:
    PutEnv("ORACLE_HOME=/home/oracle/product/release");
    PutEnv("ORACLE_SID=orcl");
    $a=ocilogon("scott","tiger");
    ocilogoff($a);
    I get a error message:
    Warning: ociopen_server: Error while trying to retrieve text for error ORA-12546 in /usr/local/apache/htdocs/ora.php on line 5
    I checked the system very carefully, I can use "sqlplus scott/tiger@orcl" connect to the database, I can also use the SQLnavigator connect the database from other machine.
    Could any kind people help me to solute this problem.
    Thanks a lot.

    Originally posted by sumit1:
    Sorry for the previous message and try the following...
    $a=ocilogon("scott@orcl","tiger");
    and no need to use putEnv() function.
    Edwin
    email:[email protected]
    OK or try $a=ocilogon("scott","tiger","orcl"); or $a=ocilogon("scott","tiger","address of database server{localhost});

  • Diffenent connections to Oracle with one FORM

    I have the problem, that I have different kinds of database operations to realize with my form.
    One one hand there are some operations which have to work every time without a special connect (informations
    for everybody) and on the other hand there are operations for which the user has to identify.
    I have to save the userid for this operations. When the user has done, he must be disconnected without
    loosing the first connection.
    Has anybody an idea how to realize this?
    Thank's very much in advance.

    You may use tha facilities of the EXEC_SQL built-in package that allows having multiple database connections to the same database or to multiple databases. Still, that doesn't help for distributed transactions.
    See the online help for exec_sql.

Maybe you are looking for

  • Upadte statistics failed in DB13

    Hi, During daily checks I found that Upadate statistics are failed in DB13. and displaying following error. No application server found on database host - rsh/gateway will be used Execute logical command BRCONNECT On host f1n2 Parameters:-u / -jid ST

  • Unable to edit file properties in Search results

    When I access a folder normally, I'm able to update a file properties but if try the same from the search results the dialog is read-only.  I also can't open the properties dialog from Windows Photo Viewer, if the picture was opened from the search r

  • Ess / Mss Error while manager tries to open the workitem in UWL.....

    Hi Experts,     As I am trying to apply the Loan details in ESS / MSS, Workflow is triggerred and workitem is received in the Manager's UWL. But when the Manager tries to open the Workitem it is going for dump. "As follows".... "    The initial excep

  • How to start to connect a database to my program?

    Dear People, I have been studying Collection classes in Java and now would like to learn how to permanently store data in a database. Up until now I have been writing programs where the data disappears after I turn my computer off. I downloaded mySQL

  • Solman_setup problem

    Hi, I am doing the inital configuration in solution manager 7.0 EHP1 from the t-code solman_setup. I completed the initial configuration already. Now i started the t-code solman_setup from the user solman_admin. It asks (everytime) to activate the We