Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2

Thread: JSP help

  1. #1
    New Coder
    Join Date
    Aug 2002
    Posts
    11
    Thanks
    0
    Thanked 0 Times in 0 Posts

    JSP help

    Currently, i have hardcoded the server connection in every page and is very tedious if there are any changes to it.

    Therefore, i need to know how to connect to the server by calling up a page that contains the server information.

    The coding i have now is:

    String connectionURL = "jdbc:mysql://servername/databaseName?user=username to enter the server & password=password to enter the server";
    Connection connection = null;
    Statement statement = null;
    ResultSet rs = null;

    Class.forName("org.gjt.mm.mysql.Driver").newInstance();
    connection = DriverManager.getConnection(connectionURL, "", "");
    statement = connection.createStatement();



    pls help....

  • #2
    raf
    raf is offline
    Master Coder
    Join Date
    Jul 2002
    Posts
    6,589
    Thanks
    0
    Thanked 0 Times in 0 Posts
    you can use a SSI (server side include)
    check out

    http://hoohoo.ncsa.uiuc.edu/docs-1.5.../includes.html


  •  

    Posting Permissions

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