Posts

Showing posts from February, 2014

The javax.servlet Package

The javax.servlet package contains a number of interfaces and classes that establish the framework in which servlets operate. The most significant of these is Servlet. All servlets must implement this interface or extend a class that implements the interface Interface Description Servlet Declares life cycle methods for a servlet. ServletConfig Allows servlets to get initialization parameters ServletContext Enables servlets to log events and access information about their environment. ServletRequest Used to read data from a client request. ServletResponse Used to write data to a client response. The following table summarizes the core classes that are provided in the javax.servlet package: Class Description GenericServlet Implements the Servlet and ServletConfig interfaces. ServletInputStream Provides an input stream for reading requests from a client.

Servlet API

Two packages contain the classes and interfaces that are required to build servlets. javax.servlet javax.servlet.http These packages are the standard extensions provided by Tomcat. Hence, these are not included in Java 6. Please follow the links for more information.

Apache Maven - How To Enable Proxy Setting

There might be a chance in your company is that a firewall is set up a and an HTTP proxy server to stop user to connect to internet directly. If you are behind a proxy, Maven will fail to download any dependencies. To make it work, you have to declare the proxy server setting in Maven configuration file settings.xml .  It can be found in conf directory, i.e.,  {M2_HOME}/conf/settings.xml. {M2_HOME}/conf/settings.xml <! -- proxies | This is a list of proxies which can be used on this machine to connect to the network. | Unless otherwise specified ( by system property or command-line switch ) , the first proxy | specification in this list marked as active will be used. | -- > < proxies > <! -- proxy | Specification for one proxy, to be used in connecting to the network. | < proxy > < id > optional </ id > < active > true </ active > < protocol > http </ protocol

Apache Maven - Installation

Apache Maven is an innovative software project management tool, provides new concept of a project object model ( POM ) file to manage project’s build, dependency and documentation. The most powerful feature is able to download the project dependency libraries automatically. We will show you how to install Apache Maven 3 on Ubuntu 12. Searching for Maven Package In a terminal, run apt-cache search maven  to get all the available Maven package. The maven  package always comes with latest Apache Maven. $ apt-cache search maven .... libxmlbeans-maven-plugin-java-doc - Documentation for Maven XMLBeans Plugin maven - Java software project management and comprehension tool maven-debian-helper - Helper tools for building Debian packages with Maven maven2 - Java software project management and comprehension tool Installing Maven Package Run the below command  to install the latest Apache Maven. $ sudo apt-get install maven Verifying Maven Installation Run the below command to veri