Home » apache

Tag Archives: apache

Apache Ant Tutorial for Beginners

1. Apache Ant Tutorial – Introduction This tutorial explains why Ant was created and its’ advantages over other build tools. This tutorial also covers the installation of Ant and what goes into an Ant project. In this tutorial, a sample project is set up. The Ant build file, for the sample project, is explored along with a discussion of how ...

Read More »

org.apache.commons.net.ftp.ftpclient Example

In this example we are going to elaborate the use of the FTPClient class in the package: org.apache.commons.net.ftp, as the package name says, it is a member of the Apache Commons, and deals with the FTP. As like other classes of the Apache Commons This class also provides us with some really helpful methods. The methods of this class as other classes ...

Read More »

ActiveMQ Tutorial for beginners

1. Introduction Before we go on with this article, we expect the pre-requisites are met, where you must have at least a beginner level understanding of the JMS API. Once you are aware of it, you might have also come across several popular JMS providers. JMS Provider is a messaging system that implements the JMS specification. This acts as the Message ...

Read More »

org.apache.commons.io.IOUtils Example

In this example we are going to elaborate the use of the IOUtils class in the package: ‘org.apache.commons.io’, as the package name says it is a part of Apache Commons IO. All members functions of this class deals with Input – Output streams Manipulations, and it really helps to write programs which deals with such matters. The methods of this ...

Read More »

Build Java EE Application with Ant and Eclipse Example

Now, that we have understood the basics of ANT in the previous example, we can now proceed to use the same, for building a Java EE Application. A typical Java Web-Application involves cleaning the old compiled Class and WAR files, re-compiling the source files, packaging it, into a WAR and finally, copying it into the deployment of the respective Web/Application ...

Read More »

Create a simple BasicDataSource object

With this example we are going to demonstrate how to create a simple org.apache.commons.dbcp.BasicDataSource object, that is the basic implementation of javax.sql.DataSource that is configured via JavaBeans properties. In short, to create a simple BasicDataSource object you should: Create a BasicDataSource object and configure the database. Use setDriverClassName(String driverClassName) method to set the jdbc driver class name. Use setUrl(String url) method ...

Read More »

Delete File from FTP Server

This is an example of how to delete a File from an FTP Server. We are using the org.apache.commons.net.ftp.FTPClient Class that encapsulates all the functionality necessary to store and retrieve files from an FTP server. Deleting a File from an FTP Server implies that you should: Create a new FTPClient. Use connect() API method to open a connection to the FTP ...

Read More »

Get list of files from FTP Server

In this example we shall show you how to get a list of files from an FTP Server. We are using the org.apache.commons.net.ftp.FTPClient Class that encapsulates all the functionality necessary to store and retrieve files from an FTP server. To get a list of files from an FTP Server one should perform the following steps: Create a new FTPClient. Use connect() API ...

Read More »

Establish connection with FTP Server

With this example we are going to demonstrate how to establish a connection with an FTP Server. We are using the org.apache.commons.net.ftp.FTPClient Class that encapsulates all the functionality necessary to store and retrieve files from an FTP server. In short, to establish a connection with an FTP Server you should: Create a new FTPClient. Use connect() API method to open a ...

Read More »

Download file from FTP Server

This is an example of how to download a File from an FTP Server, using the org.apache.commons.net.ftp.FTPClient Class, that encapsulates all the functionality necessary to store and retrieve files from an FTP server. Downloading a File from an FTP Server implies that you should: Create a new FTPClient. Use connect() API method to open a connection to the FTP Server. ...

Read More »