Quantcast
Channel: CODEBIAS
Browsing all 10 articles
Browse latest View live

JSF 2.0 Maven Archetype

Whenever I need to create a new web application in Java, I use the barebone web application Maven archetype that comes with NetBeans. Then, I proceed to add dependencies to libraries and frameworks...

View Article



Image may be NSFW.
Clik here to view.

Java Web Services – bottom-top-down approach

There are two approaches to developing web services: bottom-up and top-down. In the bottom-up approach, annotated Java classes are created first, and the WSDL is generated from these classes using...

View Article

Image may be NSFW.
Clik here to view.

How to become a better programmer?

By three methods we may learn wisdom: First, by reflection, which is noblest; Second, by imitation, which is easiest; and third by experience, which is the bitterest.- ConfuciusThese words are on my...

View Article

Apache Wicket 6.5 vs. JSF 2.0

Having developed several web applications with JSF, and recently with Apache Wicket, I want to share my experience. On the web, Wicket has mostly positive buzz, but JSF seems to be hated by many (See...

View Article

Working with JAXB for binding XML

Here are a few snippets for binding Java objects to XML using JAXB.Generating XML Schema from Java classes and vice versaThis snippet uses jaxb-maven-plugin to generate schema from a set of annotated...

View Article


Testing Java classes with field injections

Dependency injection frameworks in Java give us 3 points of injection: constructor, field and setter methods. Many of us prefer field injection because we can skip writing setter methods and keep the...

View Article

How-to: RESTful Web services with JAX-RS and Spring

When providing services in a specific technology (i.e. EJB, JAX-WS, JAX-RS), it's wise to avoid mixing the business logic of your service and the technology that you are using to expose it to the...

View Article

Environment configuration property injection using Java CDI

In Spring Framework, injecting environment properties is made simple using the context:property-placeholder to configure property file locations and the @Value("#{propKey}") annotation to specify the...

View Article


Troubleshooting in Java

This post is just a collection of troubleshooting tips that I've picked up during the years. Java processesThe easiest way to list Java processes is to use the jps utility that comes with JDK. It's...

View Article


Versioning REST APIs with a custom Accept header in Jersey

Versioning REST APIs is a hot topic these days. In this post, I will show you how versioning with a custom Accept header works in Jersey, without going into the politics of which versioning approach is...

View Article
Browsing all 10 articles
Browse latest View live




Latest Images