Association Aggregation and Composition in Java

In this post. We will talk and learn about Association Aggregation and Composition in Java Association Association is the relation between two separate classes or entities that establish through their Objects. We can categorize associations in the following types: one-to-one one-to-many many-to-one many-to-many. In the Object-Oriented programming world, an Object can communicate with other Objects by… Read More »

Difference between get() and load() methods in Hibernate

In this post, We will learn the difference between get() and load() methods in Hibernate.  When we call the load() method hibernate creates a proxy object and returns the proxy object, but in the case of get() method, there is no concept called proxy it directly hits/calls the database. The load() method loads an object… Read More »

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 »