Tag Archive For "JAVA"
sun.net.www.protocol.http.HttpURLConnection cannot be cast to javax.net.ssl.HttpsURLConnection
Error java.lang.ClassCastException: sun.net.www.protocol.http.HttpURLConnection cannot be cast to javax.net.ssl.HttpsURLConnection at com.chillyfacts.com.Send_HTTP_Request.call_me(Send_HTTP_Request.java:21) at com.chillyfacts.com.Send_HTTP_Request.main(Send_HTTP_Request.java:13) You might be using URL obj = new URL(url); HttpsURLConnection con = (HttpsURLConnection) obj.openConnection(); Solution,Convert it to http protocol URL obj = new URL(url); HttpURLConnection con = (HttpURLConnection) obj.openConnection(); See the Example shown in this link, https://chillyfacts.com/java-send-http-getpost-request-and-read-json-response/
Download java-json.jar
Download java-json.jar The contents are shown below META-INF/MANIFEST.MF org.json.CDL.class org.json.CDL.java org.json.Cookie.class org.json.Cookie.java org.json.CookieList.class org.json.CookieList.java org.json.HTTP.class org.json.HTTP.java org.json.HTTPTokener.class org.json.HTTPTokener.java org.json.JSONArray.class org.json.JSONArray.java org.json.JSONException.class org.json.JSONException.java org.json.JSONML.class org.json.JSONML.java org.json.JSONObject.class org.json.JSONObject.java org.json.JSONString.class org.json.JSONString.java org.json.JSONStringer.class org.json.JSONStringer.java org.json.JSONTokener.class org.json.JSONTokener.java org.json.JSONWriter.class org.json.JSONWriter.java org.json.XML.class org.json.XML.java org.json.XMLTokener.class org.json.XMLTokener.java Download Here. After downloading please extract the downloaded file. java-json.zip Check the below link to add the …
JAVA- Send HTTP Get/Post Request and Read JSON response
This tutorial shows how to send HTTP Get Request using java and Read JSON response. To read json Response you will have to add java-jason.jar to class path. Send HTTP Get Request with Parameters. For testing I have signed UP with http://ipinfodb.com/ which gives the location of IP address for a get request with the …
Get IP address Location of Client/User JAVA web project
This project shows how to take IP address of user in your Web Project. And you can use the IP address to predict the location where they are using. Update the Key after registering in the website https://ipinfodb.com/ Get_Location_From_IP.java package Modal; import java.io.BufferedReader; import java.io.InputStreamReader; import java.net.URL; public class Get_Location_From_IP { public Location_Use_Bean get_ip_Details(String ip) …
Integrate Login with Reddit in Website using JAVA
Download the Source code here reddit_login_project.rar
Integrate Login with LinkedIn in Website using JAVA
Download the project Here. linkedin
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(); …
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 …
Solution for ClassNotFoundException-How to add jar file in eclipse java project
This tutorial shows how to add java jar to Class path of Eclipse project. This is same process for all java Projects including Java Web Project or Any static project. If Java jar file is not imported for specific projects you will get ClassNotFoundException Exception. So adding jar to class path is the solution for …
Add Captcha in JAVA JSP Pages
Download the project here Captcha.rar