Home » Enterprise Java

Enterprise Java

Log4j Conversion Pattern Example

Logging is a critical feature of any application. In this tutorial, I will show you how to implement some useful Log4j Conversion Patterns for writing the logging mechanism in Java development. 1. Introduction Printing messages to the console is an integral part of the development testing and the debugging of a Java program. If developers are working on a Server ...

Read More »

Log4j writing to Different Log Files Example

Logging is a critical feature of any application. In this tutorial, I will show you how to configure the Log4j to write logs to multiple files based on the category. To achieve this in our tutorial, we would be using the LevelRangeFilter. 1. Introduction Printing messages to the console is an integral part of the development testing and the debugging ...

Read More »

Log4j 2 Best Practices Example

Logging is a critical feature of any application. In this tutorial, we will cover some Log4j2 best practices that can help developers get started and improve the logging with Log4j2. 1. Introduction Printing messages to the console is an integral part of the development testing and the debugging of a Java program. If developers are working on a Server side ...

Read More »

Log4j 2 Getting Started Example

In this tutorial, we will show you how to configure the Log4j2 with log4j2.xml file and print the logging to the console and a file. 1. Introduction Printing messages to the console is an integral part of the development testing and the debugging of a Java program. If developers are working on a Server side application, where they cannot see ...

Read More »

Apache Maven Checkstyle Plugin Tutorial

Maven Checkstyle is a tool to help ensure that the application’s Java code adheres to a set of coding standards. 1. Introduction The Eclipse Checkstyle Plugin (aka eclipse-cs) integrates the static source code analyzer Checkstyle into the Eclipse IDE. Checkstyle is an Open Source development tool to help developers ensure that their Java code adheres to a set of coding ...

Read More »

JAX-RS Web Service Example

Hello readers. In this tutorial, we will show how to use the JAX-RS (RESTful) jar files to implement a simple Hello World Web Service in Java. 1. Introduction JAX-RS stands for RESTful Web Services. JAX-RS is a set of APIs to develop the REST services. It is part of the Java EE6 and makes developers to develop the REST web ...

Read More »

Java Servlet RequestDispatcher Tutorial

Communication between the Servlets is an important task to the programmer. Request Dispatcher is an interface whose implementation defines an object which can dispatch the request to any resources on the server. In this tutorial, we will see how the javax.servlet.RequestDispatcher interface is used to forward or include the response of a resource in a Servlet. Table Of Contents 1. ...

Read More »

Java Servlet Application for Login Page

Servlets are modules of the Java code that run in a server application to answer the client requests. They are not tied to a specific client-server protocol but are most commonly used with HTTP. The word “Servlet” is often used in the meaning of “HTTP Servlet“. In this tutorial, we will explain how to handle the Servlet HTTP POST Request ...

Read More »

Java Servlet Websocket Example

In this article we illustrate a simple chat program using a Websocket endpoint. The Java API for websocket provides both client and server api’s and can be found in the javax.websocket javax.websocket.server packages accordingly. The example article will do a brief dive into the mechanics of Websockets from a Java perspective and then it will demonstrate some of it’s mechanics via a ...

Read More »

Java Servlet Url Parameters Example

Servlets are modules of the Java code that run in a server application to answer the client requests. They are not tied to a specific client-server protocol but are most commonly used with HTTP. The word “Servlet” is often used in the meaning of “HTTP Servlet” . In this tutorial, we will explain how to handle parameters of the Servlet ...

Read More »