Inspiron 0 Report post Posted January 12, 2006 I've a project that has to be done on JSP. It is to create an online movie booking service that records customer's details, reserving tickets, changing seats etc.Now the problem for me is to connect from JSP pages to MySQL database so I can store the information in MySQL. Any step-by-step tutorials and ideas? I would appreciate with screenshots are available as I'm totally new to JSP and MySQL.Thanks in advance.. Share this post Link to post Share on other sites
kvkv 0 Report post Posted January 29, 2006 You have to use a jdbc driver for mysql and it is as simple as connecting to a oracle or any other databade using jdbc through jsp. It is exaclty the same code except you will provide mysql driver for database driver.Here is a tutorial link.http://forums.xisto.com/no_longer_exists/ Share this post Link to post Share on other sites
Dumbledore 0 Report post Posted April 8, 2006 Hi!I just found a, I think, very good tutorial for you! It starts explaining which things you need to use MySQL with jsp, then it explains how to install these things, and everything else you need to know step-by-step. Planet Source CodeIt's a tutorial for using jsp / mysql with windows, I hope this is OK. I'm not using Linux... If you are able to understand german, you could also have a look at this page:JSP DevlopI think this is a really greta page for a great width of jsp themes and for getting help with jsp related problems. You find there also little workshops and code pieces to download. I hope this helps you a little bit!Greets, Chris Share this post Link to post Share on other sites
welcome77in 0 Report post Posted April 19, 2006 hi u can use jsp code for making connection between mysql and jsp which need to make connection. 1. Need mysql jdbc connector. Download it from mysql website mysql-connector.jar file 2. Copy it to tomcat or lib folder of WEB-INF in lib folder.This jar file 3. Do little coding to connect it String connectionURL ="jdbc:mysql://localhost:3306/YourDataBaseName?user=root;password="; Connection conn=null; Class.forName("com.mysql.jdbc.Driver").newInstance(); conn = DriverManager.getConnection(connectionURL,"root",""); Statement st=null; st=conn.createStatement(); ResultSet rs= null;Try itI've a project that has to be done on JSP. It is to create an online movie booking service that records customer's details, reserving tickets, changing seats etc.Now the problem for me is to connect from JSP pages to MySQL database so I can store the information in MySQL. Any step-by-step tutorials and ideas? I would appreciate with screenshots are available as I'm totally new to JSP and MySQL.Thanks in advance.. Share this post Link to post Share on other sites
humphrey88 0 Report post Posted May 28, 2006 Where is mysQL hosted? Do you own a server? Share this post Link to post Share on other sites
chackboom 0 Report post Posted September 4, 2010 I've a project that has to be done on JSP. It is to create an online movie booking service that records customer's details, reserving tickets, changing seats etc.Now the problem for me is to connect from JSP pages to MySQL database so I can store the information in MySQL. Any step-by-step tutorials and ideas? I would appreciate with screenshots are available as I'm totally new to JSP and MySQL.Thanks in advance.. Here is good tutorial. Try: http://jsptutorblog.blogspot.de/ Share this post Link to post Share on other sites
k_nitin_r 8 Report post Posted September 7, 2010 Hi!Hooking up Java to the MySQL database management system is not very different from hooking up to any other database management system. All that would change is the database driver that you use and the URL that you provide to JDBC to connect to the database.welcome77in posted the code. If you look carefully, you will notice that there are only two references to MySQL - one is on the first line, which refers to MySQL in the JDBC connection URL, and the other is in loading the database driver, which is specified using its fully qualified name on the third line where a new instance of the database driver class is being created. If you wanted to connect to any other database, you would simply swap out these statements for something else.Moving between database management systems, however, is not quite as simple as getting a connecting to the different database management systems. While getting a connection to the database is as simply as swapping out the JDBC connection URL and the database driver class name, the queries being made to the database would change. You would have different function names specific to the database management system being used, the type of quotes that you use might change from single quotes to double quotes, or the other way round, and you might have stored procedures that you invoke which differs the most between database management systems when you consider it from a development perspective because the store procedure extensions to SQL themselves are proprietary and vendor-specific as is their behavior. If you do have to move the data across between database management systems, it is just as complex because the data types of the columns may not match and the database management systems would have limitations on the maximum number of columns or the maximum data that can be stored per row, or perhaps even the maximum length of a column - all of which could create issues when moving across different database management systems.My point is that when you have worked with one database management system, it is easy to learn to move to another database management system but you do have to be aware that there will be code changes involved, unless the application was initially developed considering that the database management system could be swapped out with one from a different vendor. Share this post Link to post Share on other sites