Storing data in your JSF 2.0 application

In this tutorial we will compare the available options for storing Object data into a Web application, showing at first the core JSF 2 scopes and the extension provided by CDI. Core JSF scopes JSF 2.0 specification defines the following scope scopes for storing data: @RequestScoped @ViewScoped @SessionScoped @ApplicationScoped @CustomScope Using the Request scope is … Read more

Categories JSF

JSF ViewScoped tutorial

The @ViewScoped has been introduced by JSF 2.0 specification. In a nutshell the data which is @ViewScoped will keep living as long as you don’t navigate to another pagee to itself. The view scope is very convenient, since it allows the pattern of initializing data when you first access a page (via a non-faces request, which is typically a GET request) and then keep that data when you work on the page, doing postbacks, AJAX requests, etc.

Read more

Categories JSF

Java EE 6 tutorials on JBoss / WildFly

Basic course ( Eclipse Tools, EJB-JSF ) Step 1 Installing JBoss Tools on Eclipse Step 2 Develop a Java EE 6 application on JBoss AS 7 Step 3 Add Rich JSF Libraries (Richfaces) Add Rich JSF Libraries (Primefaces) Step 4 Cluster a Java EE 6 Application on JBoss AS 7 Step 5 Add Data Grid … Read more

soapUI tutorial for Eclipse

In this tutorial we will show how to deploy and test your Web Services on WildFly /JBoss application server using soapUI plugin. soapUI is a free and open source cross-platform Functional Testing solution. With an easy-to-use graphical interface, and enterprise-class features, soapUI allows you to easily and rapidly create and execute automated functional, regression, compliance, … Read more

How to call a method with parameters in JSF

The simplest (and most powerful) way to pass parameters is via JSF method expression which has been introduced in JSF 2.0 and EL 2.2. So this is only possible if you’re running on a Servlet 3.0 / EL 2.2 capable container like Tomcat 7, Glassfish 3, JBoss AS 6, etc and your web.xml is been … Read more

Categories JSF

How to create an EJB Startup Service

A startup service can be used to eagerly initialize some resources in your application or in external resources. Thanks to Java EE 6 addition, you don’t need anymore vendor solutions which allow to create startup classes. Just plug in a Bean which is tagged as @Startup and @Singleton: package com.mastertheboss; import javax.annotation.PostConstruct; import javax.ejb.Singleton; import … Read more

Web services Handler Chains tutorial

Web Services and their clients may need to access the SOAP message for additional processing of the message request or response. You can create SOAP message handlers to enable Web Services and clients to perform this additional processing on the SOAP message. A SOAP message handler provides a mechanism for intercepting the SOAP message in … Read more

Apache CXF Interceptors

Interceptors are the fundamental processing unit which is native in Apache CXF. Basically they are Java classes that intercept your message to provide or apply certain core services to it. In this tutorial we will show how to use them and how to create some custom ones. Apache CXF provides many built-in Interceptors that provide … Read more

Developing Web services on JBoss AS 7

In this tutorial we will show how to deploy a JAX-WS Web service on JBoss AS 7. You will see how you can easily deploy and test a Web service in the new application server release. In order to use Web services in the new application server release you need the following extension in your … Read more

Java EE 6 example application

Today you can find many articles showing Java EE 6 examples and new features. However it’s missing a complete tutorial showing how to design and deploy a sample Java EE 6 application on JBoss AS 6. While it’s not intended to be the “the right” way to design Java EE 6 applications, this tutorial can … Read more

Categories JSF