Do you want to know how to develop your skillset to become a Java Rockstar?

Subscribe to our newsletter to start Rocking right now!

To get you started we give you our best selling eBooks for FREE!

 

1. JPA Mini Book

2. JVM Troubleshooting Guide

3. JUnit Tutorial for Unit Testing

4. Java Annotations Tutorial

5. Java Interview Questions

 

and many more ....

 

 

Slf4j Spring Boot Example

In this example, we are going to learn how to use SLF4J in Spring projects with an example of Spring Boot application. 1. Introduction The Simple Logging Facade for Java (SLF4J) serves as a simple facade or abstraction for various logging frameworks (e.g. java.util.logging, logback, log4j) allowing the end user to plug in the desired logging framework at deployment time. ...

Read More »

JSF Example with Eclipse and Tomcat

In this example, we will learn how to configure a JSF example with eclipse and tomcat. We will discuss the tools used and steps required to configure your first JSF enabled sample application. 1. Introduction JSF is an MVC framework that eases the user interfaces for server based applications by reusable UI components. It facilitates Web application development by: Providing ...

Read More »

Get Xpath From Html Example

In this example we will learn how to find the XPath of a given element in HTML. We will try to use different tools to achieve this. 1. Introduction XPath is a W3C recommendation. It can be used to navigate through elements and attributes in an XML document. It is a syntax for defining parts of an XML document. It ...

Read More »

Java XPath Performance DOM vs SAX Example

1. Introduction This article compares the performance of the Java DOM parser distributed with Java and a SAX parser distributed with the Home Edition of Saxon for evaluating various XPath expressions. Typically DOM parsers can evaluate XPath expressions faster than SAX parsers since DOM parsers construct and retain the DOM document in memory when parsing XML data. SAX parsers, on ...

Read More »

Slf4j Format String Example

In this example, we are going to see how String log messages can be constructed in SLF4J with parameter substitution. 1. Introduction SLF4J is a facade or an abstraction layer over various logging frameworks. Also known as Simple logging Facade for Java is not actually a logging implementation, instead, it’s an abstraction layer. It allows you to use any logging library ...

Read More »

Xpath Find by Attribute Value Example

In this article we will learn how to find an xml element using attribute value. We will use IDEA IntelliJ 14.0.2 and Java 8. 1. Introduction XPath is a W3C recommendation. XPath can be used to navigate through elements and attributes in an XML document. XPath is a syntax for defining parts of an XML document. XPath uses path expressions ...

Read More »

JUnit Test Void Method Example

In this example, we shall show you to test void methods. In JUnit Test Void Method example we will learn how we can test the void methods using the JUnit. In our previous tutorials, we have learned a lot about the JUnit and its various techniques about testing. But in our previous tutorials we haven’t seen how we can test ...

Read More »

Xpath Search by id Example

In this article we will learn how to search for an element (by id) in an XML using XPath. We will make use of IDEA IntelliJ to work on this. I am using IntelliJ 14.0.2 and Java 8. 1. Introduction XPath is a W3C recommendation. XPath stands for XML Path Language. XPath uses path expressions to select nodes or node-sets ...

Read More »

Log4j Database Appenders Example

In this example, we are going to learn how to log messages from our application into database with log4j. 1. Introduction Log4J is one of the many logging frameworks available to use with Java, perhaps the most popular of all of them. With Log4J you can log general flow of the application as well as record exceptions. Few points to ...

Read More »

JUnit Test Constructor Example

In JUnit Test Constructor Example, we shall show you the process of testing the constructor of a class. It is as simple as we are testing other methods. Since the constructor is called before any other methods of the class we need to see the relevance of testing it. Constructors are used for initializing the class and then do some ...

Read More »