Loading...


bookmark - Connecting Jsp To Mysql

Connecting Jsp To Mysql

 
 Discussion by Inspiron with 7 Replies.
 Last Update: September 7, 2010, 6:26 pm
 
bookmark - Connecting Jsp To Mysql  
Quickly Post to Connecting Jsp To Mysql  w/o signup Share Info about Connecting Jsp To Mysql  using Facebook, Twitter etc. email your friend about Connecting Jsp To Mysql Print
Reply / Comment New Discussion / Topic Share / Bookmark E-Mail a Friend Print

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..








   Thu Jan 12, 2006    Reply         

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://www.stardeveloper.com/articles/disp...03090401&page=1

   Sun Jan 29, 2006    Reply         

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 Code

It'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 Devlop

I 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

   Sat Apr 8, 2006    Reply         


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

CODE


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 it

QUOTE (Inspiron)


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..

Link: view Post: 220343

   Wed Apr 19, 2006    Reply         

Where is mysQL hosted? Do you own a server?

   Sun May 28, 2006    Reply         

QUOTE (Inspiron)


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..

Link: view Post: 220343


Here is good tutorial. Try: http://jsptutorblog.blogspot.com/

   Sat Sep 4, 2010    Reply         


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.

   Tue Sep 7, 2010    Reply         

Quickly Post to Connecting Jsp To Mysql  w/o signup Share Info about Connecting Jsp To Mysql  using Facebook, Twitter etc. email your friend about Connecting Jsp To Mysql Print
Reply / Comment New Discussion / Topic Share / Bookmark E-Mail a Friend Print

Similar Topics:

How To Connect Mysql With Jsp ?

after many i tried to connect to mysql with jsp, its was now successful. but i can connect at localhost. i wonder why that. can anybody help me ? it was so good if can post complete system. e.g (login). ...more

   03-Nov-2008    Reply         

remote server connection JSP and ...

remote server connection - JSP and MYSQL as a remote server database?Setting Up A Remote Mysql ConnectionCan anyone tell me how to create the connection between the JSP and MYSQL as a remote server database. I am confused with the DSN creation and connection string.-question by pallavi ...more

   25-Feb-2009    Reply         

J2Ee And Mysql Connectivity

Can anyone please guide me in installing mysql and connecting j2ee with mysql from the beginning(step-by-step),im using tomcat 6.0?How to create a datasource name in mysql?please it would be of great help.... advance thanks ...more

   03-Aug-2011    Reply         

Horizontal Pausing News Scroller I need help modifying the speed.   Horizontal Pausing News Scroller I need help modifying the speed. (2) (1) Running .java Or .class Files From Runtime   Running .java Or .class Files From Runtime