Home » Enterprise Java » Page 41

Enterprise Java

Java Servlet Session Timeout Configuration Example

In this tutorial, we will show you how to set up the Session Timeout in a Servlet based web application. 1. Introduction Tomcat has a default timeout of 30 minutes but the default timeout depends on different web containers. The default session timeout in a web application can be configurable in two ways:         1.1 Session Timeout ...

Read More »

Apache ActiveMQ Monitoring Tutorial

Apache ActiveMQ (AMQ) is an open source messaging server written in Java which implements JMS 1.1 specifications. In this example, I will explain how to monitor an AMQ server.                   Table Of Contents 1. Introduction 2. Monitor ActiveMQ JVM 3. Monitor ActiveMQ Web Console 4. Monitor ActiveMQ File System 5. Monitor ActiveMQ ...

Read More »

Java Servlet Exception Handling Example

When a servlet generates an error developers can handle those exceptions in various ways, let’s say a user tries a URL that does not map to a servlet the user typically gets a 404 page. With the error listing in the deployment descriptor, we can handle those exceptions. In this tutorial, we will see how to tackle these exception handling ...

Read More »

Java Servlet ServletConfig vs ServletContext Example

Servlets are modules of the Java code that run in a server application to answer the client requests. ServletContext and ServletConfig are two important interfaces of the Servlet API which is used by Java J2EE programmer during the web application development. In this tutorial, we will see how the ServletContext and ServletConfig are different from each other. 1. Introduction The ...

Read More »

Java Servlet Session Management Example

We all know that HTTP is a stateless protocol i.e. all requests and responses are independent. But sometimes developers need to keep track of the client’s activity across the multiple requests. In this tutorial, we will see how to achieve the Session Management in Servlet Java programming. 1. Introduction Session tracking or Session management is an important feature of the ...

Read More »

Spring Integration Splitter Example

1. Introduction Spring Integration provides many components for processing messages before they reach their end point. Splitter is the component that breaks down a message into multiple messages based on specific criteria. The benefit is that after splitting, the system can apply separate business logic on each part. For example, in an order management system, separate parts of the order ...

Read More »

Apache ActiveMQ Failover Example

Apache ActiveMQ is an open source messaging server written in Java, which implements JMS 1.1 specifications. In this example, I will demonstrate how to configure a group of AMQ brokers to make the system fault-tolerant.                 Table Of Contents 1. Introduction 2. Apache ActiveMQ Server Installation 3. Apache ActiveMQ Server Configuration 3.1 Two ...

Read More »

Java Servlet Database Connectivity Example

Servlets are modules of the Java code that run in a server application to answer the client requests. In this tutorial, we will explain and show you how to connect the servlet to the database. 1. Introduction Servlet is a Java program which exists and executes in the J2EE servers and is used to receive the HTTP protocol request, process ...

Read More »

Java Servlet Cookie Methods Example

Servlets are modules of the Java code that run in a server application to answer the client requests. In this tutorial, we will show you how to store the user information in the cookie object and access it in the Servlet. 1. Introduction Servlet is a Java program which exists and executes in the J2EE servers and is used to ...

Read More »

Java Servlet HTTP Response Headers Example

Servlets are modules of the Java code that run in a server application to answer the client requests. In this tutorial, we will explain and show you how to use the HTTP response headers in the Servlet page. 1. Introduction Servlet is a Java program which exists and executes in the J2EE servers and is used to receive the HTTP ...

Read More »