How to get client Ip Address in Java
In Java, you can use HttpServletRequest.getRemoteAddr() to get the client’s IP address that’s accessing your Java web application. For web application which is behind a proxy server, load balancer or…
Favourite tutorials for developers
In Java, you can use HttpServletRequest.getRemoteAddr() to get the client’s IP address that’s accessing your Java web application. For web application which is behind a proxy server, load balancer or…
This example shows you how to get the HTTP request headers in Java. To get the HTTP request headers, you need this class HttpServletRequest : 1. HttpServletRequest Examples 1.1 Loop…
This example shows you how to get the Http response header values in Java. 1. 1. URLConnection - Standard JDK example. 2. Apache HttpClient example.
In this tutorial, we will show you how to use Java library – “Apache Commons Net” to get WHOIS data of a domain.
The HttpURLConnection‘s follow redirect is just an indicator, in fact it won’t help you to do the “real” http redirection, you still need to handle it manually.
In this example, we will show you how to login a website via standard Java HttpsURLConnection. This technique should be working in most of the login form. Tools & Java…
Here’s a simple Java HTTPS client to demonstrate the use of HttpsURLConnection class to send a HTTP GET request yo get the https URL content and certificate detail.
JSON (JavaScript Object Notation) is a simple, lightweight and easy to read and write data exchange formats. In Java, normally we use Jackson or Gson to parse JSON.
This article shows you how to use the new Java 11 HttpClient APIs to send HTTP GET/POST requests, and some frequent used examples.
This article shows you how to use the OkHttp library to send an HTTP GET/POST requests and some frequent used examples.