JSF MySQL CRUD Create Read Update Delete Project-JSF Tutorial Part 10

This tutorial shows a simple Create Read Update Delete project in Java Server Faces JSF. Mysql is used as database here and the IDE used is NetBeans Project structure in NetBeans Mysql Database Data DB_connection.java package com.chillyfacts.com; import java.sql.Connection; import java.sql.DriverManager; public class DB_connection { public static void main(String[] args) throws Exception{ DB_connection obj_DB_connection=new DB_connection(); …

Continue reading

java.lang.ClassNotFoundException: com.mysql.jdbc:Driver [Solved]

The Exception in Java Project is shown below. java.lang.ClassNotFoundException: com.mysql.jdbc.Driver at java.net.URLClassLoader$1.run(URLClassLoader.java:200) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:188) at java.lang.ClassLoader.loadClass(ClassLoader.java:307) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301) at java.lang.ClassLoader.loadClass(ClassLoader.java:252) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:169) at Simple.MyProg.main(MyProg.java:15) Solution, Download the Mysql Jar from below link. https://chillyfacts.com/mysql-connector-jar-download/ Add the jar to Classpath. Check the below link to add the Jar in …

Continue reading

How to connect to remote MySql database from NetBeans

This tutorial shows java program to connect to remote MySql Database from NetBeans IDE. Include the MySql jar in classpath of the project. You can download MySql jar here. Update your Database information in the program. DB_Connection.java package DB_Connection; import java.sql.Connection; import java.sql.DriverManager; public class DB_Connection { public static void main(String[] args) { DB_Connection obj_DB_Connection=new …

Continue reading

Mysql connector jar download

You can download MySql Connector Jar here mysql-connector-java-5.1.42-bin.rar You can visit https://dev.mysql.com/downloads/connector/j/ for latest updates See how to Add the jar to Classpath. Check the below link to add the Jar in Classpath in Eclipse https://chillyfacts.com/how-to-add-jar-file-in-eclipse-java-project/

Continue reading

Java program to connect to mysql database

This tutorial shows a Simple java program to connect to MySql database and do a basic select operation from the table. Project Structure in Ecllipse IDE. This project uses MySql Connector jar. You have to download it and add to class path. Download Mysql Connector jar here. DB_Connection.java package com.chillyfacts.com; import java.sql.Connection; import java.sql.DriverManager; public class …

Continue reading

Copy Mysql database from one server to another server

This tutorial shows how to transfer Mysql Database from one server to another server without any software. In this tutorial we are transferring our Local host server database to a server located remotely hosted in freemysqlhosting.net. Click here to see how you can register free to get remote MySql database online. The image below shows my …

Continue reading

Free Mysql Database Online – Free Mysql Remote Hosting

This tutorial shows step by step process for having remote MySql database which can be used in Websites free of Cost. For this simply register in website https://www.freemysqlhosting.net/. We are using service from this website to take remote database online. Simply register your email id in the link below, https://www.freemysqlhosting.net/register/?action=register After Registration you will get confirmation …

Continue reading

How to populate options of h:selectOneMenu from database? JAVA JSF

The Project Structure in netbeans is shown Mysql Table Structure CREATE TABLE `categories` ( `sl_no` INT(11) NOT NULL AUTO_INCREMENT, `category_name` VARCHAR(50) NOT NULL DEFAULT ‘0’, PRIMARY KEY (`sl_no`) ) MySql Table Data index.xhtml <?xml version=’1.0′ encoding=’UTF-8′ ?> <!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN” “http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd”> <html xmlns=”http://www.w3.org/1999/xhtml” xmlns:h=”http://xmlns.jcp.org/jsf/html” xmlns:f=”http://xmlns.jcp.org/jsf/core”> <h:head> <title>Facelet Title</title> </h:head> <h:body> <h:form> …

Continue reading

Auto Back up Mysql Database without any Software

This tutorial shows how to take back up of a MySql Database without any software. This can be done by creating a scheduled task with a Bat file. Here is the Step by Step process for that. If you want to a auto back up Mysql database test_111 as shown below First we will check how …

Continue reading