Category: Java

java tutorials

Split String using Tokenizer in Java

In this tutorial we show you how to split a string in Java. We explore the usage of String#split(regex) method and the StringTokenizer class. The first one is recommended to use in future projects....
java tutorials

How to parse a date in Java

In this tutorial we will show you how to parse a date in Java. To parse a date the JDK provides a SimpleDateFormat class. You can either define your own custom date format strings...
java tutorials

How to format Date in Java

In this tutorial we will show you how to format date in Java. To format a date the JDK provides a SimpleDateFormat class. You can either define your own custom date format strings or...
jsf tutorials

JSF Dropdown Menu Example

This tutorial shows you how to create a JSF Dropdown menu. We can provide values to the <h:selectOneMenu> or jsf dropdown menu in three ways: hard-coded, via a map or via an object array....
jsf tutorials

JSF CommandButton Example

This tutorial explains how to use the <h:commandButton> element. The <h:commandButton> generates by default a HTML <input type=”submit”> element which submits the parent form using an HTTP POST method. This form is required. If...
jsf tutorials

JSF Select One And Select Many Checkboxes Example

In this tutorial we will show you how to use checkboxes in JSF. We can have two types of checkboxes: SelectBooleanCheckbox: assign a single value to the managed property. selectManyCheckbox: assigns an array of...
jsf tutorials

Passing parameters in JSF Facelets Templating

In this tutorial we show you how to pass parameters in JSF using Facelets Templating. We will be passing parameters down the chain using the <ui:param> element. Main Layout Template This is our main...