Web Development with Java and JSF

Developing web applications with Java, JavaServer Faces and NetBeans had been a great pleasure (and success) to me for a couple of years, when I first wanted to write a book about JSF in late 2010. At this time, I got in touch with some German publishers. My goal was to write apx. 200-250 pages about this subject, nothing more. “No thanks, too special” had been the common answer. And: “Great. Add some more pages, e.g, another thousand, and write about the whole Java Enterprise edition. Keep JSF smaller than 200 pages.” Frustrating answers. Continue reading “Web Development with Java and JSF”

JSF and Bean Validation issue

To prevent injections and other attacks, input validation is a kind of must. JSF supports this by its own validator concept. Beside this, JSF takes advantage of Bean Validation (JSR 349): You may define constraints within your class, e.g. an entity. JSF will call this validation for every field or getter which is annotated with a constraint. Every field? No, there is a strange behavior. Continue reading “JSF and Bean Validation issue”

JSF: Invalidate session

To preserve state, a cookie with a session id is send to the client’s browser. During the next request, this cookie is transmitted to the server. By this, the server is able to restore state.

For security reasons, it is good practice to renew this session number once the user logs in or out. Continue reading “JSF: Invalidate session”

CDI issue using GlassFish 4

In my former post about a “CDI issue using GlassFish” [1] I talked about a problem which seems to be widely spread . So far, I recognized a lot of visits, and some people reported similar problems in their comments. Beside the possible solution I described in my blog, memory tuning seemed to help. Read my recent comment of this blog entry [1].

[1] http://blog.mueller-bruehl.de/programming/cdi-issue-using-glassfish-4/

Parallel 2014 – klein, aber fein

Vom 5. bis 6. Mai fand in Karlsruhe die Parallel2014, die Softwarekonferenz für Parallel Programming, Concurrency und Multicore-Systeme, statt. Veranstalter waren iX, heise Developer sowie der dpunkt.Verlag. Es handelte sich um die dritte Auflage dieser Konferenz und ein erstes Indiz für die Qualität waren die Wiederkehrer. Zahlreiche Teilnehmer kamen bereits zum zweiten, einige gar zum dritten Male. Nach Angaben der Veranstalter waren mehr als 140 Teilnehmer anwesend – und damit war die Veranstaltung fast ausgebucht. Es handelte sich also nicht um eine Massenveranstaltung, sondern um eine eher kleinere Konferenz. Continue reading “Parallel 2014 – klein, aber fein”

Using Lambda expressions with JSF 2.2

JSF 2.2 comes in conjunction with EL 3.0. This version of the expression language offers a rarely known highlight: It is capable of using lambda expressions and streams. Even thought defined withing the Jave EE 7 spec (and not Java 8), you can still use these cool features! Continue reading “Using Lambda expressions with JSF 2.2”

Joining Java Streams

Java 8 introduced some impressive new features. Lambdas in conjunction with Streams finally support a functional style of programming.

But, unlike LINQ of the .NET world, there is no operator to join streams. Thus, I tried to join streams manually. My approach is to use second a stream in a lambda expression within a map operation. Other options are thinkable. Continue reading “Joining Java Streams”

Java 8 & NetBeans 8

The official Java 8 release was published today. If you have already installed the Java 8 FCS version, build 132, then usually there is no need to download the current version. It’s almost the same, except some commercial features like Java Flight Recorder, which are bundled to today’s release. Read Mark Reinhold’s blog about JDK 8: General Availability [1].

NetBeans 8 is available too [2]. Take a look on it’s features by some screen-casts [3].

[1] http://mreinhold.org/blog/jdk8-ga
[2]  https://netbeans.org/downloads/
[3] https://netbeans.org/kb/docs/intro-screencasts.html