Results 1 to 2 of 2

Thread: JSP connect MySQL

  1. #1

    Thread Starter
    Member
    Join Date
    Jun 2001
    Posts
    57

    JSP connect MySQL

    I am beginner to MySQL. What should i include in a JSP page to connect to MySQL database?
    Is it possible to have an example page coding??

  2. #2
    Addicted Member HairyDave's Avatar
    Join Date
    Aug 2002
    Location
    Er...I can't remember.
    Posts
    196
    To connect to a database in JSP (java) you need to do a number of things:

    Define the JDBC driver: Class.forName(DriverName)

    Get the connection: java.sql.DriverManager.getConnection (URL,username,password);

    The URL is something like - "jdbcdbc:Fred" where Fred is the data source.

    This might be a bit confusing so go to http://java.sun.com/docs/books/tutor...ics/index.html for a tutorial sort of thing.

    If you need more help I don't mind doing it (above is what I can remember off the top of my head - might be wrong)- but I need access to my programs which are at work

    HD

Posting Permissions

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



Click Here to Expand Forum to Full Width