Home Discussion Discuss: Connect JSP with mysql

  • jspsan April 1, 2011 at 12:17 PM

    hello!! the solution provided for database connectivity was woking properly, it worked when i copy mySqlConnector.jar in lib folder.

  • querycristine June 9, 2011 at 11:20 AM

    I tried the code for connecting jsp to mysql. Error Code : 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.' at line 1 (0 ms taken) That was the result when I execute the query. What is my mistake? Thanks!

  • questionERNEST RUGEMA January 3, 2012 at 7:18 PM

    what shall I do when Output of the program is unable to connect to specified MySQL database .please your feedback is important.

  • data basesathish March 9, 2012 at 1:35 AM

    con't connect db in mysql for jsp

  • CoDLxPnnvWJriJFrancis March 22, 2012 at 12:40 AM

    I would like to show some appreciation to you just for ruecsing me from this type of crisis. Right after checking throughout the world wide web and seeing ideas which were not helpful, I believed my life was over. Living without the presence of answers to the issues you've solved as a result of your main article content is a crucial case, as well as ones that would have negatively damaged my entire career if I had not discovered your website. That expertise and kindness in controlling all the details was priceless. I'm not sure what I would have done if I had not encountered such a subject like this. I'm able to at this moment look ahead to my future. Thanks a lot very much for your high quality and effective guide. I will not be reluctant to propose your web blog to anyone who would need recommendations about this problem.

  • connection problem in jsp using mysqlNeeraj April 25, 2012 at 10:28 AM

    i have written this code using mysql and java and it is not connecting it is giving the message as u have mentioned above in program,,,, what should i do to connect ??? if i try java application using mysql and compile using javac it is connecting,, it is creating problem in jsp... it doesn't give me any error.. please help..

  • Not worksdularl July 22, 2012 at 10:50 PM

    I am 1000% sure that i followed every step precisely and i can access my databases through navicat too but it is still unable to connect, username and password are correct too.

  • javaashem dijen singh August 24, 2012 at 2:11 PM


  • thanksraju September 27, 2012 at 12:39 PM

    thanks a lot ..you saved my day

  • javaraj January 5, 2013 at 8:44 PM

    how to develop knowledge in java and how to become a good programmer.give your suggestions

  • jsp+Mysqlbarack hussein May 15, 2013 at 4:04 PM

    Please help me,i followed the step but i am not able to connect jsqp and database mysql.I paste mysqlconnector in lib folder of JDK but it's not working.

  • not able to connect to database using jspprashanth r June 12, 2014 at 8:45 AM

    <%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <%@ page import="java.sql.*" %> <%@ page import="java.io.*" %> <html> <head> <title>Connection with mysql database</title> </head> <body> <h1>Connection status </h1> <% try { /* Create string of connection url within specified format with machine name, port number and database name. Here machine name id localhost and database name is usermaster. */ String connectionURL = "jdbc:mysql://localhost:3306/students"; // declare a connection by using Connection interface Connection connection = null; // Load JBBC driver "com.mysql.jdbc.Driver" Class.forName("com.mysql.jdbc.Driver").newInstance(); /* Create a connection by using getConnection() method that takes parameters of string type connection url, user name and password to connect to database. */ connection = DriverManager.getConnection(connectionURL, "root", "123"); // check weather connection is established or not by isClosed() method if(!connection.isClosed()) %> <font size="+3" color="green"> <% out.println("Successfully connected to " + "MySQL server using TCP/IP..."); connection.close(); } catch(Exception ex){ %> </font> <font size="+3" color="red"></b> <% out.println("Unable to connect to database."); } %> </font> </body> </html> but it is showing that unable to connect database... please tell me what is wrong with my code

  • helpsangeetha August 5, 2013 at 7:32 AM

    how i copy the mysqlconnector.jar file.where it is

Post your Comment

Your Name (*) :
Your Email :
Subject (*):
Your Comment (*):
  Reload Image
Related Articles
JSP Servlet Questions

JSP &MYSQL  Develop a web page for the telephone directory using jsp and mysql 

Development process Questions

JSP with Mysql
JSP with Mysql  Hi sir, I trying to several time but i am not get an answer. My questions are 1. How to inserting same field data to different mysql table using jsp. That is creating a form with 5 fields,data's are same 

SQL Question

jsp mysql
........... like that all requests nd comments should be display through jsp and mysql...jsp mysql  actually i want a page that has two frames nd in 1 frame i'l add a textarea to post some help nd nw when he clicks on post button it has 

JSP Servlet Questions

JSP-Mysql - JSP-Servlet
JSP-Mysql  Hello friends, Anyone send me the way how to store image in mysql database from a jsp page.  Hi friend, Code to insert image in mysql Using Jsp : For more information on JSP 

JSP Servlet Questions

jsp and mysql
jsp and mysql  i have a form which contains dropdown list. i have to take the values to another jsp page and perform the calculation on the database... as it is and the new function value in the new jsp page.. im in the middle of the project 

JSP Servlet Questions

jsp_mysql  hi,, plz help me by providing the code for displaying SELECTED columns from mysql table which are given dynamically through checkboxes...; <html> <head><title>Read from mySQL Database</title> 

JSP Servlet Questions

jsp/mysql connection
jsp/mysql connection  I am puttng the following files in the lib folder of jdk to connect jsp and mysql and in the lib folder of tomacat and in the lib folder of project of netbeans but I am unable to to connect jsp and mysql 

JSP Servlet Questions

jsp/mysql connection
jsp/mysql connection  I am puttng the following files in the lib folder of jdk to connect jsp and mysql and in the lib folder of tomacat and in the lib folder of project of netbeans but I am unable to to connect jsp and mysql 

JSP Servlet Questions

How to connect mysql with jsp
How to connect mysql with jsp  how to connect jsp with mysql while using apache tomcat 

JSP Servlet Questions

jsp & mysql - JSP-Servlet
jsp & mysql  can anybody tell me hoe to overcome from following error i am facing this problem...plz help me... org.apache.jasper.JasperException: Communication failure during handshake. Is there a server running on localhost 

JSP Servlet Questions

connection of jsp with mysql - JSP-Servlet
Example of connection between JSP and MYSQL  Need an example of connection between JSP and MYSQL 

JSP Servlet Questions

jsp,mysql - JSP-Servlet
jsp,mysql  hi i need a code to retrieve data to text boxes and move the records and also allow the user to change/delete the record SEMINARS THEME 

JSP Servlet Questions

jsp with mysql bolb - JSP-Servlet
jsp with mysql bolb  how to display images from mysql bolb in jsp?(in my selected area)  Hi friend.... http://www.roseindia.net/jsp/retrieve-image.shtml Thanks 

Java Beginners

connection to mysql in jsp
connection to mysql in jsp  please i got this error message when trying to connect to mysql database in jsp. Unknown character set: 'utf8mb4 

Java Beginners

jsp, mysql - Java Beginners
jsp, mysql  i want to store / insert the selected value in the combo box (jsp), into the mysql. how to do it?... pls help me in urgent 

JSP Servlet Questions

connection of jsp with mysql - JSP-Servlet
connection of jsp with mysql  can anybody tell me about connection of JSP with MYSQL? and also tell me which version is compatible with tomcat 4.1 i am using tomcat 4.1, MYSQL 5.0 but i have problem with connection 

Java Beginners

mysql with jsp - Java Beginners
mysql with jsp  i wanted to insert a combo box value to mysql table usgin jsp. how to perform that. can anybody help me in urgent.  Hi... For more information on JSP visit to : http 

JSP Servlet Questions

connecting jsp to mysql - JSP-Servlet
development' project that uses JSP, MySQL and tomcat.i am not able to connect to the mysql database through jsp. After downloading the mysql-connector-java-5.0   One jar file is needed to connect java with mysql data base. That can 

JSP Interview Questions

JSP - MySQL - Connection
JSP - MySQL - Connection  I can't connect mysql using jsp in my... to resolve this problem.I set classpath for the mysql connector jar (/home/aghiltu/apache-tomcat-6.0.26/lib/mysql-connector-java-5.1.8-bin.jar)..... And i also tried 

JSP Servlet Questions

MySql - JSP-Servlet
MySql  Hello friends, I am developing a JSP project with back end MYSQL and i am using SQLYOG editor enterprise 7.11. I got the serial number also...; Hi friend, http://www.roseindia.net/mysql/mysql-front.shtml Thanks 

Java Beginners

mysql jsp - Java Beginners
mysql jsp  how to insert values to mysql? i want to insert values from a combo box to mysql... how to perform that. pls help me in urgent.  Hi friend, Plz give full source code where you having the problem 

JSP Servlet Questions

interface to mysql - JSP-Servlet
interface to mysql  i am creating an easy accces to mysql through jsp-sevlets,when ever user enters the query through the interface how to retrieve the result from the database where the developer has to generally develope 

JSP Servlet Questions

js,,mysql - JSP-Servlet
js,,mysql  Hi, I want a jsp code for editing,deleting data retrieved from from the mysql database and displayed in a html page .Can anybody... link: http://www.roseindia.net/jsp/user-search.shtml Hope that the above 

JSP Servlet Questions

jsp using include & with mysql
jsp using include & with mysql  Sir, I am creating a login application using jsp & Mysql. The Codes are--- Html File...... <...; Jsp file....... <%@ page import="java.sql.*" %> <% String 

JSP Servlet Questions

mysql - JSP-Servlet
mysql  code to add photo in mysql database ... i want page from which i can upload photo which will store in mysql database and display in one page in jsp...  Hi Friend, Try the following code: 1)page.jsp 

Java Beginners

Image in mysql
Image in mysql  Hi. How to insert and retrieve images in mysql db using JSP or JAVA Servlet? Thanks in advance 

JSP Servlet Questions

Backup MySQL Database - JSP-Servlet
Backup MySQL Database  Database Sir I have been reading Rose's india tutorial "Using MySQL Database with JSP/Servlet". In the Tutorial you have shown an example of backing up the database. When I tried to backup database 

JSP Servlet Questions

login page with mysql using jsp
login page with mysql using jsp  pls i need a sample of login page to check username and password in mysql database. thanks 

JSP Tutorials

Connect JSP with mysql
Connect JSP with mysql   ...; This query creates database 'usermaster' in Mysql. Connect JSP with mysql : Now in the following jsp code, you will see how to connect 

Java Server Faces Questions

excel report fro jsp mysql
excel report fro jsp mysql  Dear Sir, I am facing some problem while generating excel report form mysql database using jsp code. With the help from... data. But I need your help for generating a excel file from mysql DB for blob