Home » Tag Archives: JSF

Tag Archives: JSF

JSP, JSF and EL Introduction

JavaServer Pages, JavaServer Faces, and Expression Language In this article, I am going to take a look at JavaServer Pages (JSP) and Expression Language (EL) and then relate it to JavaServer Faces (JSF).  I will talk about how to access HTTP objects directly in the JSP and JSF code and you will see some examples of the syntactic difference between ...

Read More »

What is JavaServer Faces (JSF) – (Part 2)

Facelets Declaration Language In part 1 I introduced the basic idea behind JavaServer Pages (JSF). In this article, I would like to introduce the Facelets declaration language. HTML tags The first tags we meet are the HTML tags that represent HTML elements. These are really just syntactic sugar over HTML tags such as input, radio button etc. but provide some ...

Read More »

What is JavaServer Faces (JSF)

java-interview-questions-answers

This is a two-part series in which I look at JSF 2 and how it fits into the Java EE ecosystem. In part 1 I introduce the basic idea behind JavaServer Pages (JSF) and in part 2 I will introduce the Facelets declaration language. When building a web application we provide the end user with a way to interact with ...

Read More »

NetBeans Java EE Tip #9: Create JSF Application from Database

Do you need to create an database front-end very quickly?  The NetBeans IDE allows one to develop a JSF application front end for a set of database tables very quickly, and with very little coding.  Now this tutorial is an oldie, but a goodie…and it is worth mentioning again for those who are not aware of it. First, create your ...

Read More »

DynamicReports and JasperReports with JSF, Servlet and CDI

In this example, I will show how to integrate DynamicReport and JasperReports with Servlet and CDI. Tools: TIBCO Jaspersoft Studio-6.0.4.final. Eclipse  Luna Service Release 2 (4.4.2). WildFly 8.x application server. This is a screenshot from the project hierarchy on Eclipse.     The pom.xml file contains the required dependencies for the Servlets + JSF + CDI + DynamicReports. <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" ...

Read More »

Creating JSF/CDI Maven project on Eclipse

While I was working on a JSF and CDI example, I thought it would be useful to mention the steps required to create JSF and CDI Maven project. You can find the bellow steps to do so. Tools Eclipse Luna that’s shipped with the M2E plugin by default. So no need to install the plugin yourself. WildFlye 8.x.     ...

Read More »

A Look at the Upcoming JSF 2.3 Push Support

As mentioned in previous posts, there are a number of enhancements being added to the next release of JavaServer Faces (Mojarra).  JSF 2.3 is slated to be released with Java EE 8 in 2017, but you can get your hands on some of the enhancements and updates to JSF for testing purposes now by building from source or running a ...

Read More »

How view parameters are obtained/attached from/to the URL query string (examples) ?

Let’s dissect several simple use cases and see how view parameters works (view parameters names are not mandatory to match the request parameters passed via URL query string, but in this post we will focus on this case): CASE 1 In index.xhtml page we have: <f:metadata> <f:viewParam name="playernameparam" value="#{playersBean.playerName}"/> <f:viewParam name="playersurnameparam" value="#{playersBean.playerSurname}"/> </f:metadata> ... <h:form> Enter name:<h:inputText value="#{playersBean.playerName}"/> Enter surname:<h:inputText ...

Read More »

JSF Scopes Tutorial – JSF/CDI Session Scope

The session scope lives across multiple HTTP request-response cycles (theoretical unlimited).                     The request scope is very useful in any web application when you need a single interaction per HTTP request-response cycle. However, when you need objects visible for any HTTP request-response cycle that belongs to a user session, then you ...

Read More »