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”

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

Tutorial web development (with JSF) XIV – Security Part III

Now, after we’ve addressed basic log-in with simple file realm, I want to move on by exchanging the authentication method. Remember, this tutorial is about web development with JavaServer Faces. All I showed for container based security so far, is technology entirely independent from JSF. Same applies to simple form log-in. But, it’s possible to embed this into some JSF techniques. And, further on, using programmatic log-in, this is done by the use of JSF. Continue reading “Tutorial web development (with JSF) XIV – Security Part III”

NetBeans enhancements

I suggested some NetBeans enhancements. If you like such features too, please vote for them:

  • Test code usually is separated from productive code, e.g. by usage of two folders like java/main and java/test. It is common to place test in the same packages as the code under test. In NetBeans, project tree, there are two branches, Source Packages and Test Packages. By a common convention, tests are named like the class to be tested with a postfix of Test, e. g. MyClass and MyClassTest The suggestion is to display a third branch Logical Packages, which is a merged view. Thus, a test are displayed next to the classes to be tested. [Task #239800]
  • When renaming a class, NetBeans offers the option to rename the test too. The suggestion is to offer a similar feature whilst renaming a package. [Task #240025]
  • When you write java code and refer a non-existent method, NetBeans offers a create method feature. When you edit a JSF page, NetBeans alerts missing property or missing method. I recommended to offer a create feature too. [Task #239818]

 

Tutorial web development (with JSF) XII – Security Part I

Sometimes it is crucial to protect an application or data against unauthorized access. Although there is no need to secure my tiny calculator, I’m going to demonstrate the principals of container based security by using this small app. For a description of the project, please refer to Tutorial web development (with JSF) III: Basic arithmetics.

Container provided security is not specific to JSF. It’s part of the HTTP handling and might be used by a simple servlet too. But later on, I’m going to show you, how to integrate this into a JSF application by using programmatic access. But, first of all, some background. Continue reading “Tutorial web development (with JSF) XII – Security Part I”

NetCAT 8 started today

The NetBeans Community Acceptance Testing program (NetCAT) for the upcoming version 8.0 started today. Join this program and help to improve this great IDE.

Read about this program on the NetCAT site [1].

Signing up for this program is nothing more than simply filling a small web form [2]. It’s recommended to subscribe to the NetCAT mailing list. A link is provided at the end of registration.

[1] wiki.netbeans.org/NetCAT
[2] services.netbeans.org/dashboard/web/netcat_signup.php

 

GlassFish 4 and UTF-8

Do you build web applications with JSF and GlassFish? And do you need to process inputs with characters which are coded with multi-bytes using UTF-8, e.g. German Umlauts? You might have recognized a strange behavior if you use GlassFish 4.

Now, let’s check for the problem by building a simple application. With NetBeans, simply choose New Project, Java Web, Web Application. Add JSF as framework. If you need detailed information how to create a web application with NetBeans, please take a look into my JSF tutorial. Continue reading “GlassFish 4 and UTF-8”