Spring Quartz code snippets for beginners

Add cronjob like capability to Java web applications in 4 simple steps using Spring and Quartz. This article outlines the steps needed for scheduling, with code snippets for each step.

Java Barcode API

This article demonstrates how to read and write bar codes from a Java program. We use the open source library “zxing” which supports many different types of bar code including the 2D QRCode, used by mobile apps. It can even read a barcode embedded somewhere in the page in a busy text document.

How to display maven project version in your webapp

This article describes how to display the version of your maven project in your web application.

How to copy bean properties with a single line of code

This article shows how to copy multiple properties from one bean to another with a single line of code, even if the property names in the source and target beans are different. Copying properties from one bean is quite common especially if you are working with a lot of POJOs, for example working with JAXB [...]

Calling a static method from EL

This post shows how to call any static method from EL. You can also pass arguments to the method.

How to pass parameters in EL methods

How to pass multiple parameters in an EL function, in 3 simple steps.

Getting started with Nexus Maven Repo Manager

This tutorial outlines steps required to install Nexus (Maven Repository Manager) under Tomcat, or another webapp container. It shows you practical configuration and includes code snippets that go in your pom.xml and settings.xml in order to read and publish artifacts to Nexus server.

2 ways to convert Java Map to String

This article shows 2 ways to convert Java Map to String. Approach 1: simple, lightweight – produces query string like output, but restrictive. Approach 2: uses Java XML bean serialization, more robust but produces overly verbose output. Approach 1: Map to query string format Approach 1 converts a map to a query-string like output. Here’s [...]

JAXB code snippets for beginners

JAXB is a Java library used for reading and writing XML files. Unlike DOM or SAX, JAXB is a high level library that maps XML directly to Java Objects. You point JAXB to an XML file and it returns you a Java object representing the XML. While JAXB is easy to use, it may take some time to get started. I’ve documented everything that you need to know, with code snippets, to help you start using JAXB in a few minutes.

Maven Selenium

Our goal: compile the app run non-selenium unit tests package your app into a .war file start a test container (jetty or tomcat) deploy your app to the test container start a browser point the browser to the app running in the test container test your application through the browser. these tests are junit tests [...]

Get Adobe Flash playerPlugin by wpburn.com wordpress themes