Press enter to see results or esc to cancel.

Java JSP MySql CRUD Project

In this video tutorial series I have shown how to create Create Read Update Delete (CRUD) in Java Server Pages(JSP). Project Structure in Eclipse DB_Connection.java package common; import java.sql.Connection; import java.sql.DriverManager; public class DB_Connection { public static void main(String[] args) { DB_Connection obj_DB_Connection=new DB_Connection(); System.out.println(obj_DB_Connection.get_connection()); } public Connection get_connection(){ Connection connection=null; try { Class.forName(“com.mysql.jdbc.Driver”); connection …

Continue reading

How to create or read TXT / NotePad File using JAVA

In this video I have shown how to create and read text or Notepad file using java. Create java Text file, Update the path of output file as per your need. Write_TXT_File.java package chillyfacts.com; import java.io.PrintWriter; public class Write_TXT_File { public static void main(String[] args) { PrintWriter writer; try { writer = new PrintWriter(“C:\\Users\\MIRITPC\\Desktop\\jas\\test1.txt”, “UTF-8”); …

Continue reading

ZIP or UnZip files or folder using java

In this video I have demonstrated, 1. How to Zip/Compress a file. 2. How to Zip/Compress a Folder. 3. How to Unzip/Decompress file or folder. You can Zip a file using below code. Update the path of file and destination as per your need. Zip_File_Test.java package ZIP; import java.io.FileInputStream; import java.io.FileOutputStream; import java.io.IOException; import java.util.zip.ZipEntry; …

Continue reading

JAVA-Download a file from URL

How to download a file from URL using Java. The jar file org.apache.commons.io.jar should be added to class path as shown in the video Update the Directory Name, File Name and URL as per your need. 1. Download_URL.java package URL_Download; import java.io.BufferedInputStream; import java.io.File; import java.io.FileOutputStream; import java.io.IOException; import java.net.MalformedURLException; import java.net.URL; import org.apache.commons.io.FileUtils; public …

Continue reading

JAVA-Send URL HTTP Request and Read XML Response

In the below code I have shown how to read XML response after sending HTTP URL request using JAVA. For testing we have used Google Maps TimeZone API which returns XML response with the time zone of requested Coordinates. Get the API key and documentation from the below link. https://developers.google.com/maps/documentation/timezone/start Test_HTTP_XML.java package XML_TEST; import java.io.BufferedReader; …

Continue reading

JAVA MySQL Create Read Update Delete CRUD Project

In this video I have shown how to create a Java Project which can do Create Read Update Delete Operations. First create a new database ‘crud’ in Mysql. Then create a table ‘user’ CREATE TABLE `user` ( `sl_no` INT(5) NULL DEFAULT NULL, `name` VARCHAR(100) NULL DEFAULT NULL, `email` VARCHAR(100) NULL DEFAULT NULL ) COLLATE=’latin1_swedish_ci’ ENGINE=InnoDB …

Continue reading