How to create CSV file using java

In this video I have shown how you can create a CSV file or Comma Separated Values file using java. The below source code is explained in the video, Create_CSV.java package com.chillyfacts.com; import java.io.File; import java.io.PrintWriter; public class Create_CSV { public static void main(String[] args) { try { PrintWriter pw= new PrintWriter(new File(“C:\\Users\\MIRITPC\\Desktop\\csv\\books_table.csv”)); StringBuilder sb=new …

Continue reading

Hide .php extensions, Custom url for PHP pages with parameters, htaccess

In this video I have shown how you can have custom URL for you PHP web site. It is done by htaccess file, Please note that htaccess file should be created in ROOT folder of your project. 1. Project files Web pages 2. index.php <a href=”index.php”>INDEX</a> | <a href=”ABOUT”>ABOUT</a> | <a href=”PRODUCT”>PRODUCT</a> | <a href=”CONTACT”>CONTACT</a> …

Continue reading

Connect MySQL database using PHP and Select values from Table

In this video I have shown how you can Connect to your MySQL database and select values from the table in that database. Here in this example I am connecting to local host MySQL database Connect to Database with below code <?php echo ‘Hello<br>’; $hostname=’localhost’; $username=’root’; $password=’root’; $database=’test’; $conn=new mysqli($hostname,$username,$password,$database); if(!$conn){ die(‘Error In connection’.mysqli_connect_error()); }else{ …

Continue reading

JAVA – Send SOAP XML Request and Read Response

In the video I have shown how you can create an XML request and send to an endpoint URL, Then receive the response from the server. You can send both get request and post request with below examples. Send_XML_Post_Request_1.java and Send_XML_Post_Request_2.java are 2 different example codes. Send_XML_Post_Request_1.java package com.chillyfacts.com; import java.io.BufferedReader; import java.io.DataOutputStream; import java.io.InputStreamReader; …

Continue reading

JAVA send http Get Post request with basic authentication

In the video I have shown how you can send HTTP get request and Post request with a real time example. The server is giving response in JSON format. The JSON response is parsed with java to get the parameters output. This source code is demonstrated with reddit login API documents. You will have to …

Continue reading

Java program to Convert JSON to XML

In the video I have shown you step by step, How you can code a simple java program that can convert JSON to XML. You need to import jar file to classpath in eclipse. You can download the jar file here java-json.jar Source JSON example. { “glossary”: { “title”: “example glossary”, “GlossDiv”: { “title”: “S”, …

Continue reading

Integrate Login with Facebook using Javascript

In this video I have shown how to integrate login in web applications using Javascript. This example project is run on PHP as front end. I used XAMMP serve for testing. 1. First create a APP in facebook developer site. https://developers.facebook.com/ 2. Get your APP id from the app. 3. Update your APP id in …

Continue reading

Simple JAVA program to download Youtube vidoes

Using the below simple java program you can download Youtube videos. We have to download an executable exe file from below link or their website. Download youtube-dl here. youtube-dl.rar Download this exe file and keep in the folder where you need to have your downloaded videos. 1. Project Structure in Eclipse IDE. 2. my_main.java package …

Continue reading

Read Outlook .msg file using JAVA

In this video I have shown how you can read .msg file using java. This example is shown in Eclipse IDE. 1. Project Structure. 2. 3 Jar files are required for this project. These jar files should be added to class path of the project. poi-scratchpad-3.9.jar msgparser-1.1.15.jar poi-3.9.jar 3. Read_MSG.java package com.chillyfacts.com; import java.util.Iterator; import …

Continue reading

Java JSP Javascript – Submit form without reloading page

In this video I have shown how to submit a form from a JSP page without refreshing the page. This is purely on Javascript and will work on any HTML supported platforms like PHP, .Net etc. This project is demonstrated in Eclipse IDE with Tomcat server. 1. Project Structure in Eclipse IDE. 2. index.jsp holds …

Continue reading