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 […]
Posts in category Programming
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 […]
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.
In my former post about a “CDI issue using GlassFish”  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 […]
I recently visited the German conference for parallel programming. Read my report  (German).  Parallel2014 – klein, aber fein
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 […]
Ok, we secured our JSF web application by using a JSF form. The user information is still stored in a flat text file. But as stated before, your application server provides more. This lesson, we move forward to GlassFish’s JDBCRealm, which allows you to store the user information within the database.
Within a web application, you often need a state to create a session lifecycle. You may create a CDI named been with session scope, to keep track of some user data. Suppose, you have a JSF application. Assigned to your pages you might use named beans with request scope. If you need some session-wide info, […]
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 […]