Author Archive

Builder pattern

Consider using a builder pattern when faced with classes that have constructors that take a large number of parameters.

Tags:    

Generate entity classes with Hibernate Tools

I recently gave a try to reverse engineering a database into entity classes by using Hibernate Tools. And it is quite cool.

Tags:       

Insert image in iReport using xml datasource

When using an XML file as a datasource for a report designed with iReport-Designer for JasperReports, you sometimes want to add an image, which also should be retrieved from the XML datasource. For this, we have to first find a way to represent that image in the XML file, and then, interpret it from there [...]

Tags:      

GWT2.1 UI Binder internationalization

Building an internationalized application with GWT and UI Binder requires some steps to be followed: For every <ui:UiBinder> tag inside each view, the following attributes need to be provided

Tags:       

Regular expressions

Regular expressions (or regexp) are used in programming to identify a template, a model, or elements that repeat in a predictable manner. They are a special sequence of characters that help you match or find strings or sets of strings, using a specialized syntax. Regular expressions reduce development time, because it takes only one line [...]

Tags:         

JAX-WS Webservices

This article will briefly describe how to create a JAX-WS webservice with JBoss 5.1 and how to avoid JAXB serialization/deserialization problems that might arise during the deploy process of the webservice.

Tags:      

Adding error messages in JSF

When developing applications with JSF, there is the need to display error messages back to the user, if a user submitted form contains errors, or if the processing of the data went wrong. For this request, JSF meets the <h:message/> tag.

Tags:    

Login module via LDAP with Active Directory User in Java

In this article I will briefly describe the steps needed for creating a user login for an application with users registered in an Active Directory. Login will be done via LDAP protocol, and the credentials will be matched against the Active Directory registered user’s credentials.

Tags:       

How to create a zip file with Java and offer it for download

In many web applications at some point a programmer meets the need to make an archive of a/some document(s) and offer this archive for download. The main JAVA utilities for executing this archiving task are inside package java.util.zip. These classes implement an output stream filter for writing files in the ZIP file format. They include [...]

Tags:        

What to do when you need to import a large MSSQL database dump inside a virtual machine and you have no sufficient space?

It is a good idea to hold your database server inside a virtual machine and run it only if needed. This will save the memory space from being loaded with running services when you don’t need them. But what if you need to import a large database dump file and there is no sufficient space [...]

Tags: