Why won't the browser display this?

It compiles and I can run it from the command line. But when I
try to run it from the browser it does nothing. If I remove the
jdbc calls it displays "Antonio6"
import java.sql.*;
import oracle.html.*;
public class table2
public static void main (String args [])
throws SQLException, ClassNotFoundException
HtmlHead hd = new HtmlHead("Table Sample");
HtmlBody bd = new HtmlBody();
bd.setBackgroundColor("#fffff2");
HtmlPage hp = new HtmlPage(hd, bd);
// Load the Oracle JDBC driver
Class.forName ("oracle.jdbc.driver.OracleDriver");
// Connect to the database
// You can put a database name after the @ sign in the
connection URL.
Connection conn =
DriverManager.getConnection
("jdbc:oracle:oci8:@ORCL", "scott", "tiger");
// Create a Statement
Statement stmt = conn.createStatement ();
// Select the ENAME column from the EMP table
ResultSet rset = stmt.executeQuery ("select ENAME from EMP");
while (rset.next ())
bd.addItem(rset.getString(1));
bd.addItem(new banner("Antonio6"));
hp.print();
null

You cannot run JDBC/OCI program inside a browser.
Try using THIN driver.
Antonio (guest) wrote:
: It compiles and I can run it from the command line. But when I
: try to run it from the browser it does nothing. If I remove the
: jdbc calls it displays "Antonio6"
: import java.sql.*;
: import oracle.html.*;
: public class table2
: public static void main (String args [])
: throws SQLException, ClassNotFoundException
: HtmlHead hd = new HtmlHead("Table Sample");
: HtmlBody bd = new HtmlBody();
: bd.setBackgroundColor("#fffff2");
: HtmlPage hp = new HtmlPage(hd, bd);
: // Load the Oracle JDBC driver
: Class.forName ("oracle.jdbc.driver.OracleDriver");
: // Connect to the database
: // You can put a database name after the @ sign in the
: connection URL.
: Connection conn =
: DriverManager.getConnection
: ("jdbc:oracle:oci8:@ORCL", "scott", "tiger");
: // Create a Statement
: Statement stmt = conn.createStatement ();
: // Select the ENAME column from the EMP table
: ResultSet rset = stmt.executeQuery ("select ENAME from
EMP");
: while (rset.next ())
: bd.addItem(rset.getString(1));
: bd.addItem(new banner("Antonio6"));
: hp.print();
Oracle Technology Network
http://technet.oracle.com
null

Similar Messages

  • Why won't the images display in this flash widget?

    why won't the images display in this flash widget?
    http://www.coffeeandcandles.com/Wholesale_s/41.htm

    more info would help. If you're using actionscript and
    loading images from a folder maybe your path to that location is
    wrong. It's possible that your images aren't in the right layer or
    level but noticed that when initially published.

  • Why won't the browser allow me to download mp3s? is there a setting I need to activate?

    question regarding downloading mo3s?

    You can download mp3s using Firefox beta which can be found in the Play Store. While Firefox is playing an mp3 you can long press on it and choose save to save the file.
    This feature will make it to the release version of Firefox around May 15th.

  • Why doesn't the keyboard display lower case when this is selected?

    Why doesn't the keyboard display lower case characters when these are selected?

    The same reason physical keyboards have capital letters, easier to read. If the iPad keyboard is in caps you'd know because the Shift key would be colored blue.

  • HT201272 Why won't the Axis yahoo app show on my home page?

    Why won't the Axis yahoo app show on my home page on my iPad as the other apps?

    That's just the way the web works. If the font is not
    installed on the
    user's computer it can't display in their browser. You are
    best to stay with
    commonly installed fonts and to specify multiple fonts in
    your CSS. Start
    here:
    http://www.ampsoft.net/webdesign-l/WindowsMacFonts.html
    Walt
    "freakinhillarious" <[email protected]>
    wrote in message
    news:f7hlls$rlr$[email protected]..
    >I am using a rather unique font for my website and I have
    installed it in
    >the
    > proper directory on my computer so I can use it in
    Dreamweaver but when I
    > view
    > my webpage on any other computer the font doesn't show
    up and it just gets
    > replaced by some other font that I don't want. I've
    tried adding
    > properties in
    > my CSS page and it appears to work in Dreamweaver but
    again when I view my
    > site
    > on any other computer on the web my font is replaced
    with another.
    >
    > Please could someone help me out with this. The layout
    of my site and
    > everything doesn't allow me to use any other font.
    >

  • When I get the Please wait... message and have the latest Adobe update why won't the document open?

    When I get the Please wait... message and have the latest Adobe update why won't the document open?

    What is your operating system?  Reader version ("latest" means nothing)?
    Is this a local or only PDF?  If online, in what browser?

  • HT1688 Why won't the volume on my iPhone 5 go down when I press the bottom volume up only works?

    Why won't the volume on my iPhone 5 go down

    Hey cacobo,
    I found an article that can help with troubleshooting an iPhone's receiver or speakers.
    iPhone: Can't hear through the receiver or speakers
    http://support.apple.com/kb/TS1630
    Verify that there is nothing plugged in to the headset jack, including headsets, headphones, or adapters.
    Make sure the Ring/Silent switch is not switched to silent.
    While on the Home screen, adjust the volume buttons. If you see the icon below, indicating that headphones are attached, there may be debris or an object lodged in the headset jack:
    Check the headset jack. If there is an object lodged in the headset jack that is not easily removed, have the iPhone serviced to remove object.
    For Original iPhone: If there is light debris, such as lint, in the headset jack, try connecting a pair of headphones to the headset jack and then remove the headphones. Repeat this several times to remove the debris.
    If you have installed a protective film on the display, either ensure that the receiver is not covered or remove the film completely.
    Check the receiver mesh (which is on the top front of the device, above the display). If it appears blocked, use a clean, small, dry, soft-bristled brush to carefully and gently brush away any debris.
    If you have paired with a Bluetooth headset that is nearby, either use the headset or turn Bluetooth off (chooseSettings > General > Bluetooth).
    Restart the iPhone.
    If restarting the iPhone doesn't resolve the issue, try restoring the device.
    If the issue persists, go to the Service Answer Center - iPhone for information on service.
    Hope that helps,
    David

  • In list view: Why don't searches include results from the Collections field? Why won't the Collections column sort properly?

    In list view: Why don't searches include results from the Collections field? Why won't the Collections column sort properly?

    I create a new index on column2, (INDEX_N3)
    and change SQL to
    select 1 from table T1 where
    T1.COLUMN_002 = '848K 36892'
    This time INDEX_N3 will be used.
    but change SQL to
    select 1 from table T1 where
    T1.COLUMN_002 = '848K 36892'
    and T1.COLUMN_004 = '1000'
    The explain plan will show full scan.
    Why?
    Thanks.

  • On Mac, why won't the downloaded PDF form SUBMIT after being filled out?

    On Mac, why won't the downloaded PDF form SUBMIT after being filled out?
    Thank you for the help.
    Kind regards
    Ryan Kohler

    Hi;
    This FAQ should describe the issue - you need to be using Adobe Reader (free) or Adobe Acrobat to fill out the PDF, Preview on the Mac breaks the PDF so it is no longer usable: http://forums.adobe.com/docs/DOC-2653
    Thanks,
    Josh

  • Why won't the full song play?

    why won't the full song play? It plays the first 11 seconds on EVERY device then skips to the next song. It's Personal Jesus by Depeche Mode

    Hi bsiria,
    If you are having an issue with one or more songs not playing completely, you may want to troubleshoot this by using the steps in this arcticle -
    Songs in iTunes may not play back completely
    http://support.apple.com/kb/TS4357
    Specifically -
    If iTunes in the Cloud is available in your country, try the following steps to resolve the issue:
    Delete the purchased song that is exhibiting the problem from your iTunes library.
    Click on the Purchased link in the iTunes Store to view your previously purchased music.
    Download your previously purchased song from this list.
    Note: iTunes in the Cloud, which allows you to download previously purchased songs from the iTunes Store, is not available in every country. Learn if iTunes in the Cloud is offered in your country.
    Thanks for using Apple Support Communities.
    Best,
    Brett L

  • Why won't the Avatar Interactive Desktop work on Windows xp SP3

    As said in the title Why won't the Avatar Interactive Desktop work on Windows xp SP3. I have tried everything (uninstalling AIR, reinsalling it etc) I can think of but nothing makes it work. This image shows what I get in return every time I try to install the app. My PC meets all requirements to run Adobe AIR. Why is this occuring? I have the current version of AIR.  

    Hi oxide9999999999,
    For the moment, you have to install the version of AIR linked from their site: http://www.avatarmovie.com/desktop/index.html
    Hope this helps,
    Mirela

  • JSP generates html but the browser displays the html source

    Hi,
    I have iWS 4.1.3 on my Win2K Pro OS, as well as iAS 6.0. The documentation
    says that JSP is enabled by default. I put a simple .jsp file in my document
    root, and when I enter the url for the .jsp file, the browser displays the
    html source as opposed to rendering the html tags.
    I use IE 5.5 and Netscape 6.0, 4.77.
    Has anyone encountered this? What do I need to do to get JSP to work
    correctly.
    Thank you.
    Sincerely,
    Kalpana

    Hi,
    I too have the same setup & did not do anything additional to get it
    working, but it works fine for me. May be the request is not reaching the
    webserver or try to disable and then enable the .JSP option, it may work. I
    believe iWS newsgroup will be able to help you in this regard.
    Regards
    Raj
    Kalpana Nitzsche wrote:
    Hi,
    I have iWS 4.1.3 on my Win2K Pro OS, as well as iAS 6.0. The documentation
    says that JSP is enabled by default. I put a simple .jsp file in my document
    root, and when I enter the url for the .jsp file, the browser displays the
    html source as opposed to rendering the html tags.
    I use IE 5.5 and Netscape 6.0, 4.77.
    Has anyone encountered this? What do I need to do to get JSP to work
    correctly.
    Thank you.
    Sincerely,
    Kalpana

  • Why won't the latest version of Flash Player download on my laptop?

    Why won't the latest version of Flash Player download on my computer?

    Nobody can know. You have not provided any system information. that aside, this is the wrong forum. there's a whole one for FP questions...
    Mylenium

  • HT1420 Why won't the songs I have downloaded recently from Itunes store, load to my Ipod. Since I switched to Windows 8 I am having trouble. HELP!

    Why won't the songs I have downloaded recently from Itunes store, load to my Ipod. Since I switched to Windows 8 I am having trouble. HELP!

    What exactly happens when you try to sync?
    Was the iPod previous synced to another iTunes library/computer?
    Have you successfully synced from this iTunes library/computer before?
    If so have you done anything like update iTunes on the computer since it last successfully synced?
    Do the songs play in iTunes?          
    Are any fo the unsyning songs DRM protected?
    What is the detail format of the non-syncing songs?
    Does any media now sync to the iPod?
    Do you have the right boxes checked to sync?
    iTunes: Syncing media content to iOS devices and iPod       
    Try syncing using the manual method                
    Managing content manually on iPhone, iPad, and iPod

  • HT203164 Why won't the song titles transfer with the music when I burn to disc and play on another device?

    Why won't the song titles transfer with the music whaen I burn to disc and play or copy to another program?

    Thank you, reducing the image size worked! I had used a low res file before, and with success decided to increase the resolution/size, and then it didn't work. the image did appear in small preview in the export panel, but wouldn't burn when all was said and done. the dimensions you gave worked fine. unfortunately, it makes the image a little bit fuzzy, but i dont think i can do anything about this. at least it burned it in there. thanks!

Maybe you are looking for