Skip to main content

Using WebSockets with Java EE, part 1

Using WebSockets with Java EE, part 1

The next version of JSF, 2.3 comes with the support of the WebSocket protocol. But can’t we use such with the current version of JSF (2.2)? Yes, we can. Using Java enterprise edition (Java EE) 7 you may create a so called endpoint. NetBeans support creating this out of the box, and it can be […]

Retrieve ViewScoped bean from session ma...

Since JSF 2.0 it is preferred to use CDI beans over JSF managed beans [1]. Different annotations are available to support different scopes, e.g. @RequestScope or @SessionScope. Sometimes you need to access such a bean from a piece of software where you don’t have direct access to the FacesContext. Lets assume, you run a different, […]

JSF composite components

Let’s assume, we use JSF to write an application which offers a simple registration form. This form queries the user for his first name, last name, and email. The page definition might be similar to the one following, but can’t we avoid the repetition of code?

Generics: Type Erasure and other pitfall...

In Java Aktuell I wrote about Java generics and some problems with type erasure. Using JSF it is possible to re-produce a problem which occurs due to type erasure. A similar problem might appear in other situations. A developer, who doesn’t know about the special problems might get roped into endless debugging sessions. Here it […]

GlassFish hinter Apache HTTP Server

Haben Sie eine Applikation mittels JSF oder anderen Techniken auf einem Applikationsserver, z. B. GlassFish, erstellt und soll diese vom Internet erreichbar sein, so können Sie natürlich den AppServer direkt an Port 80 lauschen lassen. Oft aber ist es sinnvoll, einen HTTP-Server vorzuschalten, der sich dann um Lastverteilung oder bereitstellung statischer Seiten kümmern kann. Das […]