Page 2 of 2 First 12
  • Jump to page:
    #16
  1. Java Junkie
    Devshed Specialist (4000 - 4499 posts)

    Join Date
    Jan 2004
    Location
    Mobile, Alabama
    Posts
    4,021
    Rep Power
    1285
    Originally Posted by nicholas.omosa
    yes i do
    In this part of your code

    Code:
    FileOutputStream fileOut = new FileOutputStream("c:\\excelFile.xls");
    wb.write(fileOut);
    fileOut.close();
    out.println("Data is saved in excel file.");
    con.close();
    conn.close();
    System.out.println("Disconnected from database");
    } catch (Exception e) {
    }
    }
    did you also put a print statement in the catch block?
  2. #17
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2012
    Posts
    34
    Rep Power
    2
    Originally Posted by bullet
    In this part of your code

    Code:
    FileOutputStream fileOut = new FileOutputStream("c:\\excelFile.xls");
    wb.write(fileOut);
    fileOut.close();
    out.println("Data is saved in excel file.");
    con.close();
    conn.close();
    System.out.println("Disconnected from database");
    } catch (Exception e) {
    }
    }
    did you also put a print statement in the catch block?

    i dont think i did how do you do that ?
  4. #18
  5. Contributing User
    Devshed Regular (2000 - 2499 posts)

    Join Date
    May 2004
    Location
    Superior, CO, USA
    Posts
    2,418
    Rep Power
    1713
    I don't understand your issue. In the code you show you're doing nothing but getting a database connection. If you want some output then you have to actually output something. I would totally expect a blank page from the code you showed.
  6. #19
  7. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2012
    Posts
    34
    Rep Power
    2
    Originally Posted by stdunbar
    I don't understand your issue. In the code you show you're doing nothing but getting a database connection. If you want some output then you have to actually output something. I would totally expect a blank page from the code you showed.
    good, now i think we are on the same page..so how do i get the output?
  8. #20
  9. Java Junkie
    Devshed Specialist (4000 - 4499 posts)

    Join Date
    Jan 2004
    Location
    Mobile, Alabama
    Posts
    4,021
    Rep Power
    1285
    Originally Posted by nicholas.omosa
    good, now i think we are on the same page..so how do i get the output?
    I'm confused. I was under the impression that you were demonstrating in the post with the smaller amount of code that you had modified the original servlet so you could display the exceptions. Did you only have the new code as the servlet? In that case, I agree with stdunbar that it won't do anything.
  10. #21
  11. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2012
    Posts
    34
    Rep Power
    2
    Originally Posted by bullet
    I'm confused. I was under the impression that you were demonstrating in the post with the smaller amount of code that you had modified the original servlet so you could display the exceptions. Did you only have the new code as the servlet? In that case, I agree with stdunbar that it won't do anything.
    ok bullet and stdunbar..how do i print the output put of my query?
  12. #22
  13. Java Junkie
    Devshed Specialist (4000 - 4499 posts)

    Join Date
    Jan 2004
    Location
    Mobile, Alabama
    Posts
    4,021
    Rep Power
    1285
    Originally Posted by nicholas.omosa
    ok bullet and stdunbar..how do i print the output put of my query?
    If you use a simple System.out.println it should show up in the log file or if you use out.println it should show up on the screen. (Assuming you have create a PrintWriter called out.)

    Comments on this post

    • stdunbar agrees
Page 2 of 2 First 12
  • Jump to page:

IMN logo majestic logo threadwatch logo seochat tools logo