-
Java TAR example compress and decompress *.tar or *.tar.gz files
This tutorial demonstrate how to compress files or directories recursively in .tar or .tar.gz format and how to decompress a .tar or .tar.gz file.
Date: 2019-08-10 View: 1262
-
Compress and Decompress Java JAR File with Apache Compress
In this tutorial we demonstrate how to compress and decompress Java JAR files using Apache Compress. In general, JAR archives are ZIP files, so the JAR package supports all options provided by the ZIP package.
Date: 2019-08-10 View: 1666
-
Apache HttpClient 4.5 HTTP GET Request Method Example
This tutorial demonstrates how to use Apache HttpClient 4.5 to make a Http GET request. The Http GET method represents a representation of the specified resource. This could be as simple as getting an HTML page, or Getting resources formatted in JSON, XML or etc. Requests using HTTP GET Request methods should be Idempotent, meaning: these should only retrieve data and should have no other effects.
Date: 2019-08-10 View: 1139
-
Apache HttpClient 4.5 HTTP POST Request Method Example
This tutorial demonstrates how to use Apache HttpClient 4.5 to make a Http POST request. The HTTP POST request method requests that the server accepts the entity enclosed in the request as a new subordinate of the web resource identified by the URI. The posted data can be, but is not limited to, an annotation for existing resources or data formatted JSON, XML or submitted FORM data. The server can use the posted data to update resources in the database, or process this data.
Date: 2019-08-10 View: 1619
-
Apache HttpClient 4.5 HTTP PUT Request Method Example
This tutorial demonstrates how to use Apache HttpClient 4.5 to make a Http PUT request. The HTTP PUT Request Method requests that the server accepts and stores the entity enclosed in the supplied URI. If the URI refers to an already existing resource, it is modified; if the URI does not point to an existing resource, then the server can create the resource with that URI.
Date: 2019-08-10 View: 1291
-
Apache HttpClient 4.5 HTTP DELETE Request Method Example
This tutorial demonstrates how to use Apache HttpClient 4.5 to make a Http DELETE request. The HTTP DELETE Request Method requests deletes the resource specified by the URI.
Date: 2019-08-10 View: 1251
-
Apache HttpClient 4.5 How to Get Server Certificates
The following tutorial demonstrates how to obtain the certificates from the resource server using Apache HttpClient 4.5. Certificates are used to secure the connection between the client and server over HTTPS using SSL/TLS. When you need details about the certificate, for example: when does the certificate expire?, who issued the certificate? or etc. You need to read the server certificate. In the following example we explain in detail how you can do this.
Date: 2019-08-10 View: 1359
-
How to Ignore Certificate Errors in Apache HttpClient 4.5
Typically, a developer will use self-signed certificates on his local machine or in development stage of the project. HttpClient (and web browsers) will not accept untrusted connections, by default. However, we can configure the HttpClient to allow untrusted self-signed certificates.
Date: 2019-08-10 View: 2007
-
Apache HttpClient 4.5 HttpRequestRetryHandler Example
In the following example we show how to create a custom HttpRequestRetryHandler in order to enable a custom exception recovery mechanism. When using this interface, we need to implement the retryRequest method. This allows us to define a custom retry count mechanism and exception recovery mechanism. Take a look at the following tutorial.
Date: 2019-08-10 View: 1328
-
Apache HttpClient Cache 4.5 Http Caching Example
HttpClient Cache provides an HTTP/1.1-compliant caching layer to be used with HttpClient–the Java equivalent of a browser cache. The following example uses the CacheConfig of the HttpClient Cache library.
Date: 2019-08-10 View: 1208
-
Apache HttpClient 4.5 HTML FORM POST Example
Many applications need to simulate the process of submitting an HTML form, for instance, in order to log in to a web application or submit input data. HttpClient provides the entity class UrlEncodedFormEntity to facilitate the process. The following tutorial shows how to send HTML Form parameters using apache HttpClient 4.5.
Date: 2019-08-10 View: 1281
-
Apache HttpClient 4.5 Redirect Handling Requests Example
HttpClient handles all types of redirects automatically, except those explicitly prohibited by the HTTP specification as requiring user intervention. See Other (status code 303) redirects on POST and PUT requests are converted to GET requests as required by the HTTP specification. One can use a custom redirect strategy to relaxe restrictions on automatic redirection of POST methods imposed by the HTTP specification. In the following tutorial we’ll us the LaxRedirectStrategy to handle http redirects.
Date: 2019-08-10 View: 1494
-
Apache HttpClient 4.5 Custom HTTP Headers Example
An HTTP message can contain a number of headers describing properties of the message such as content length, content type, authorization and so on. HttpClient provides methods to retrieve, add, remove and enumerate headers. In the following tutorial we’ll show how to add custom HTTP Headers to the HttpClient and Http request method.
Date: 2019-08-10 View: 1310
-
Apache HttpClient 4.5 Multipart Upload Request Example
In this tutorial, we demonstrate how to do a multipart upload http request using Apache HttpClient 4.5.
Date: 2019-08-10 View: 1840
-
Spring Security + Spring LDAP Authentication Configuration Example
In this tutorial we demonstrate how to Configure Spring Security + Spring LDAP authentication application. We show how to configure spring security and spring LDAP using Java And XML Configuration.
Date: 2019-08-10 View: 3537