Results 1 to 4 of 4
  1. #1
    Join Date
    Mar 2009
    Posts
    3

    Unanswered: database with jsp

    hi..

    i instaled java 1.6, tomcat 6.0 and oracle 9i enterprise edition

    in oracle db: username is "scott" and pasword is "tiger"

    i want to retrieve the database from oracle to jsp


    i got exception here..plz help me..


    <%@page contentType="text/html"%>
    <%@ page import="java.sql.*;" %>
    <%
    Class.forName("oracle.jdbc.driver.OracleDriver");// i am getting jasper exception here//

    Connection con=DriverManager.getConnection("jdbcracle:thin:@server:1521","scott","tiger");

    PreparedStatement ps=con.prepareStatement("select tno from train");

    ResultSet rs=ps.executeQuery();
    %>

    <html>
    <body>

    <form >

    <select name="trainno">
    <%
    while(rs.next())
    {
    out.println("<option>"+rs.getString(1)+"</option>");
    }
    %>

    </form>
    <html>
    <body>

    </body>
    </html>

  2. #2
    Join Date
    Aug 2003
    Location
    Where the Surf Meets the Turf @Del Mar, CA
    Posts
    7,776
    Provided Answers: 1
    All of which are obsoleted.
    So what problem involves Oracle?
    You can lead some folks to knowledge, but you can not make them think.
    The average person thinks he's above average!
    For most folks, they don't know, what they don't know.
    Good judgement comes from experience. Experience comes from bad judgement.

  3. #3
    Join Date
    Mar 2009
    Posts
    3
    not problem with oracle..

    i am getting exception at the line where jdbc driver has to be loaded..

    actually i am beginer at this jsp with oracle...

    so need help...

    plz

  4. #4
    Join Date
    Aug 2003
    Location
    Where the Surf Meets the Turf @Del Mar, CA
    Posts
    7,776
    Provided Answers: 1
    >i am getting exception at the line where jdbc driver has to be loaded..
    So this is a Java and/or Operation System (OS) problem; which has nothing to do with Oracle itself.

    Perhaps you CLASSPATH is incomplete or incorrect.
    You can lead some folks to knowledge, but you can not make them think.
    The average person thinks he's above average!
    For most folks, they don't know, what they don't know.
    Good judgement comes from experience. Experience comes from bad judgement.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •