Author Archives: KK JavaTutorials

How to Change the Default Port of the Tomcat Server ?

In this post, We will learn Why and how to Change the Default Port of the Apache Tomcat Server? As we know that the default port of tomcat is  (8080) sometimes it may conflict with an existing application or server on your machine(for example, another web application or server already uses this port). If such… Read More »

What is SSL (Secure Sockets Layer)?

SSL stands for Secure Sockets Layer, in short, we can say that it’s the standard technology for keeping an internet connection secure and safeguarding any sensitive data that is being sent between two systems To prevent criminals or hackers from reading and modifying any information transferred. This information could be anything sensitive or personal that… Read More »

What is Apache Tomcat?

In this post, We will discuss and learn about What is Apache Tomcat? What is Apache Tomcat? Tomcat is an open-source web server and it is developed by the Apache software foundation. It handles both static and dynamic pages. Static pages are created using HTML. Dynamic ones are generated using Servlet and JSP. Tomcat serves the… Read More »

How to load log4j2 xml file programmatically ?

In this post, We will learn How to load log4j2 xml file programmatically using a demo project? In this example, We have kept our log4j2.xml in the config folder inside the project(instead of keeping log4j2.xml inside src\main\resources). pom.xml We have added log4j2  log4j-api & log4j-core dependency in the dependencies section.

log4j2.xml I have  created log4j2.xml configuration file in the config folder inside… Read More »

Log4j 2 simple example

In this post, We look at Log4j 2 simple example. Log4j2 is the updated version of the popular Apache library. It is used extensively throughout Java applications for so many years. The Apache Log4j 2 carries all the basic logging features of its predecessor and is built with some important improvements, importantly in the area of… Read More »

How to Create a Custom Appender in log4j2 ?

In this post, We will learn How to Create a Custom Appender in log4j 2? In log4j 2, We usually create a plugin for creating a custom appender. When we annotate our custom Appender class with @Plugin(name = “MyCustomAppender”, category = Core.CATEGORY_NAME, elementType = Appender.ELEMENT_TYPE, printObject = true) the plugin name becomes the configuration element name.… Read More »

Why Logging?

Logging information usually refers to the logging of our application activity that helps in analyzing the runtime behavior of the application especially when our application encounters unexpected behaviors, errors, or tracking steps executed by application flow. As much as you provide logging information. It will be easy to analyze any issues and bugs in the… Read More »

How to Send Mail Spring Boot Example

In this post, We will learn How to Send Mail Spring Boot Example using a demo Project. Spring Boot Starter email is a generally thin wrapper over Jakarta Mail API that makes very easy integration with emailing services into Spring-based applications. so here we will be using Spring starter email dependency in pom.xml to work with… Read More »

Spring Boot Actuator

In this post, We will talk and learn about Spring Boot Actuator Spring Boot provides various features to monitor and manage our application when the project is pushed into production. We can opt to manage and monitor our application by using HTTP endpoints. Auditing, health check, and metrics gathering can also be checked using Actuator… Read More »