2 Tier Example

  • Code Client.java and myDatabase.java



  • Initial page when the applet is loaded.


  • A screendump of the applet loading. The rest of the output will be saved into a file and can be seen at the end of the page. This output was used for the purpose of debugging.

    [osprey7:mispirli] 2% !app
    appletviewer Client.html &
    [1] 6739
    [osprey7:mispirli] 2%
    Client[0,0,700x500,invalid,hidden,layout=java.awt.BorderLayout]
    


  • Here we make a query for cars between the price range of $00,000 and $10,000.

    Getting results
    weblogic.jdbc.oci.Driver checking: jdbc:weblogic:oracle
    Loading library:weblogicoci19
    Finished loading library at:434
    Connecting to database using: cb97mre/******** at 497
    Connected to database at: 924
    Parsing: SELECT LENGTHB('a') FROM DUAL
    Executing: SELECT LENGTHB('a') FROM DUAL
    Done logging in at: 1022
    Connected to database
    Parsing: select car_id from bmw_car_table where car_price > '$00,000' AND car_price < '$10,000'
    Executing: select car_id from bmw_car_table where car_price > '$00,000' AND car_price < '$10,000'
    Query Returned nothing
    


  • Another query is made between the price range of $00,000 and $30,000.

    Getting results
    weblogic.jdbc.oci.Driver checking: jdbc:weblogic:oracle
    Connecting to database using: cb97mre/******** at 1
    Connected to database at: 189
    Parsing: SELECT LENGTHB('a') FROM DUAL
    Executing: SELECT LENGTHB('a') FROM DUAL
    Done logging in at: 198
    Connected to database
    Parsing: select car_id from bmw_car_table where car_price > '$00,000' AND car_price < '$30,000'
    Executing: select car_id from bmw_car_table where car_price > '$00,000' AND car_price < '$30,000'
    
    
    
    Parsing: select car_id from bmw_car_table where car_price > '$00,000' AND car_price < '$30,000'
    Executing: select car_id from bmw_car_table where car_price > '$00,000' AND car_price < '$30,000'
    13
    Parsing: select * from bmw_car_table where car_id like '%13%'
    Executing: select * from bmw_car_table where car_id like '%13%'
    HOLA!!!!
    


  • Here we press the next button and get the next query.

    Next Hit
    weblogic.jdbc.oci.Driver checking: jdbc:weblogic:oracle
    Connecting to database using: cb97mre/******** at 1
    Connected to database at: 128
    Parsing: SELECT LENGTHB('a') FROM DUAL
    Executing: SELECT LENGTHB('a') FROM DUAL
    Done logging in at: 137
    Connected to database
    5
    5
    Parsing: select * from bmw_car_table where car_id like '%5%'
    Executing: select * from bmw_car_table where car_id like '%5%'
    HOLA!!!!
    
  • We press next button several times without any results as there is no other car within this range.
    Next Hit
    Next Hit
    Next Hit
    


  • Another query is made between the price range of $00,000 and $90,000.

    Getting results
    weblogic.jdbc.oci.Driver checking: jdbc:weblogic:oracle
    Connecting to database using: cb97mre/******** at 0
    Connected to database at: 181
    Parsing: SELECT LENGTHB('a') FROM DUAL
    Executing: SELECT LENGTHB('a') FROM DUAL
    Done logging in at: 190
    Connected to database
    Parsing: select car_id from bmw_car_table where car_price > '$00,000' AND car_price < '$90,000'
    Executing: select car_id from bmw_car_table where car_price > '$00,000' AND car_price < '$90,000'
    
    
    
    
    
    
    
    
    
    
    
    
    Parsing: select car_id from bmw_car_table where car_price > '$00,000' AND car_price < '$90,000'
    Executing: select car_id from bmw_car_table where car_price > '$00,000' AND car_price < '$90,000'
    13
    Parsing: select * from bmw_car_table where car_id like '%13%'
    Executing: select * from bmw_car_table where car_id like '%13%'
    HOLA!!!!
    


  • Here we press next button to get to the next car.

    Next Hit
    weblogic.jdbc.oci.Driver checking: jdbc:weblogic:oracle
    Connecting to database using: cb97mre/******** at 0
    Connected to database at: 163
    Parsing: SELECT LENGTHB('a') FROM DUAL
    Executing: SELECT LENGTHB('a') FROM DUAL
    Done logging in at: 172
    Connected to database
    14
    14
    Parsing: select * from bmw_car_table where car_id like '%14%'
    Executing: select * from bmw_car_table where car_id like '%14%'
    HOLA!!!!
    


  • Here we press the next button several times to get to our favorite car.

    Next Hit
    weblogic.jdbc.oci.Driver checking: jdbc:weblogic:oracle
    Connecting to database using: cb97mre/******** at 1
    Connected to database at: 179
    Parsing: SELECT LENGTHB('a') FROM DUAL
    Executing: SELECT LENGTHB('a') FROM DUAL
    Done logging in at: 194
    Connected to database
    1
    1
    Parsing: select * from bmw_car_table where car_id like '%1%'
    Executing: select * from bmw_car_table where car_id like '%1%'
    HOLA!!!!
    Next Hit
    weblogic.jdbc.oci.Driver checking: jdbc:weblogic:oracle
    Connecting to database using: cb97mre/******** at 0
    Connected to database at: 153
    Parsing: SELECT LENGTHB('a') FROM DUAL
    Executing: SELECT LENGTHB('a') FROM DUAL
    Done logging in at: 162
    Connected to database
    2
    2
    Parsing: select * from bmw_car_table where car_id like '%2%'
    Executing: select * from bmw_car_table where car_id like '%2%'
    HOLA!!!!
    Next Hit
    weblogic.jdbc.oci.Driver checking: jdbc:weblogic:oracle
    Connecting to database using: cb97mre/******** at 1
    Connected to database at: 132
    Parsing: SELECT LENGTHB('a') FROM DUAL
    Executing: SELECT LENGTHB('a') FROM DUAL
    Done logging in at: 141
    Connected to database
    3
    3
    Parsing: select * from bmw_car_table where car_id like '%3%'
    Executing: select * from bmw_car_table where car_id like '%3%'
    HOLA!!!!
    Next Hit
    weblogic.jdbc.oci.Driver checking: jdbc:weblogic:oracle
    Connecting to database using: cb97mre/******** at 1
    Connected to database at: 131
    Parsing: SELECT LENGTHB('a') FROM DUAL
    Executing: SELECT LENGTHB('a') FROM DUAL
    Done logging in at: 140
    Connected to database
    4
    4
    Parsing: select * from bmw_car_table where car_id like '%4%'
    Executing: select * from bmw_car_table where car_id like '%4%'
    HOLA!!!!
    Next Hit
    weblogic.jdbc.oci.Driver checking: jdbc:weblogic:oracle
    Connecting to database using: cb97mre/******** at 1
    Connected to database at: 148
    Parsing: SELECT LENGTHB('a') FROM DUAL
    Executing: SELECT LENGTHB('a') FROM DUAL
    Done logging in at: 157
    Connected to database
    5
    5
    Parsing: select * from bmw_car_table where car_id like '%5%'
    Executing: select * from bmw_car_table where car_id like '%5%'
    HOLA!!!!
    Next Hit
    weblogic.jdbc.oci.Driver checking: jdbc:weblogic:oracle
    Connecting to database using: cb97mre/******** at 1
    Connected to database at: 179
    Parsing: SELECT LENGTHB('a') FROM DUAL
    Executing: SELECT LENGTHB('a') FROM DUAL
    Done logging in at: 188
    Connected to database
    6
    6
    Parsing: select * from bmw_car_table where car_id like '%6%'
    Executing: select * from bmw_car_table where car_id like '%6%'
    HOLA!!!!
    Next Hit
    weblogic.jdbc.oci.Driver checking: jdbc:weblogic:oracle
    Connecting to database using: cb97mre/******** at 1
    Connected to database at: 164
    Parsing: SELECT LENGTHB('a') FROM DUAL
    Executing: SELECT LENGTHB('a') FROM DUAL
    Done logging in at: 173
    Connected to database
    7
    7
    Parsing: select * from bmw_car_table where car_id like '%7%'
    Executing: select * from bmw_car_table where car_id like '%7%'
    HOLA!!!!
    Next Hit
    weblogic.jdbc.oci.Driver checking: jdbc:weblogic:oracle
    Connecting to database using: cb97mre/******** at 1
    Connected to database at: 205
    Parsing: SELECT LENGTHB('a') FROM DUAL
    Executing: SELECT LENGTHB('a') FROM DUAL
    Done logging in at: 225
    Connected to database
    8
    8
    Parsing: select * from bmw_car_table where car_id like '%8%'
    Executing: select * from bmw_car_table where car_id like '%8%'
    HOLA!!!!
    


  • More queries

    Getting results
    weblogic.jdbc.oci.Driver checking: jdbc:weblogic:oracle
    Connecting to database using: cb97mre/******** at 1
    Connected to database at: 187
    Parsing: SELECT LENGTHB('a') FROM DUAL
    Executing: SELECT LENGTHB('a') FROM DUAL
    Done logging in at: 195
    Connected to database
    Parsing: select car_id from bmw_car_table where car_price > '$70,000' AND car_price < '$80,000'
    Executing: select car_id from bmw_car_table where car_price > '$70,000' AND car_price < '$80,000'
    Query Returned nothing
    


  • More queries

    Getting results
    weblogic.jdbc.oci.Driver checking: jdbc:weblogic:oracle
    Connecting to database using: cb97mre/******** at 1
    Connected to database at: 151
    Parsing: SELECT LENGTHB('a') FROM DUAL
    Executing: SELECT LENGTHB('a') FROM DUAL
    Done logging in at: 161
    Connected to database
    Parsing: select car_id from bmw_car_table where car_price > '$50,000' AND car_price < '$60,000'
    Executing: select car_id from bmw_car_table where car_price > '$50,000' AND car_price < '$60,000'
    
    Parsing: select car_id from bmw_car_table where car_price > '$50,000' AND car_price < '$60,000'
    Executing: select car_id from bmw_car_table where car_price > '$50,000' AND car_price < '$60,000'
    7
    Parsing: select * from bmw_car_table where car_id like '%7%'
    Executing: select * from bmw_car_table where car_id like '%7%'
    HOLA!!!!