Author Archives: Robert Piasecki

About Robert Piasecki

Husband and father, Java software developer, Linux and open-source fan.

Adding external/custom jars into Maven project

One of the strongest points of Maven is that it automatically manages project dependencies. The developer just needs to specify which dependencies and in which version are needed and the Maven takes care of the rest including downloading and storing … Continue reading

Posted in Java, Maven | Tagged , | 12 Comments

Integrating Hibernate with Spring

When building a web application, we will sooner or later need to somehow store data entered by users and retrieve it later. In most cases the best place to keep such data is a database because it additionally provides many … Continue reading

Posted in Hibernate, Java, Java EE, Spring | Tagged , , , , , | 1 Comment

Repeating annotations in Java 8

In Java 7 and before attaching more than one annotation of the same type to the same part of the code (e.g. a class or a method) was forbidden. Therefore, the developers had to group them together into single container … Continue reading

Posted in Java | Tagged | Leave a comment

Custom annotations in Java

Java developers are not limited to using built-in annotations only but can also create their own annotations to provide additional functionality. For example many Java frameworks define custom annotations to provide (or at least simplify usage of) such functionality as: … Continue reading

Posted in Java | Tagged , | 3 Comments

Annotation basics in Java

Annotations are a kind of metadata attached to various parts of the source code in Java. Although they do not directly affect how the code works, they are processed and used by different tools to provide additional functionality or services … Continue reading

Posted in Java | Tagged | 1 Comment

Facelets ui:repeat tag

Facelets ui:repeat tag can be used as a substitute of h:dataTable tag from JSF HTML library or c:forEach tag from JSTL core library. While using h:dataTable tag is still the preferred method to create tables, ui:repeat tag gives developer more … Continue reading

Posted in Java, Java EE, JSF | Tagged , , , | Leave a comment

Data tables in JSF

Data table is one of the most advanced UI components provided by JSF. This component is used to represent data in a table form and can contain multiple rows and columns and optionally header, footer and caption. In this post … Continue reading

Posted in Java, Java EE, JSF | Tagged , , , , | 4 Comments

Parameterized unit tests in JUnit

Sometimes you may want to execute a series of tests which differ only by input values and expected results. Instead of writing each test separately, it is much better to abstract the actual tests into a single class and provide … Continue reading

Posted in Java, Software development practices | Tagged , , | 2 Comments

Evaluating postfix expressions

The standard notation used to represent mathematical expressions is called infix notation. You should be very familiar with it already because it is almost exclusively used in books and thought in schools. Just to be clear, the typical example of … Continue reading

Posted in Algorithms, Java | Tagged , | 3 Comments

Git: branching and merging

Branch is a core concept in Git and many other version control systems. Generally speaking, a branch is a line of development which is parallel and independent of all other lines but which still shares the same history with all … Continue reading

Posted in Git, Version control | Tagged , , | Leave a comment