Skip to main content
View by: Most Recent | Topic | Community | Webloggers   
Monthly Archives:    

Blogs by Community: GlassFish

• Adopt a JSR  • Embedded  • GlassFish  
• Global Education and Learning  • Identity Management  • IoT  
• Java Communications  • Java Desktop  • Java Enterprise  
• Java Patterns  • Java Tools  • Java User Groups  
• Java Web Services and XML  • JavaFX  • JCP  
• JDDAC  • Jini  • JXTA  
• Mac Java  • NetBeans  • Open JDK  
• Portlet  • Robotics  • Sun Grid  
• Sun RFID and Sensor  • [no association]  

Java Enterprise

Using the Java 8 Date Time Classes with JPA! With the Java 8 SE release, developers get a splendid new best-in-class Date-Time API. Wouldn't it be nice if you could use it with JPA? Not so fast. JPA and for that matter JDBC know nothing about the new classes, and if you use them in your entities, JPA will map them to BLOBs in your database by default. This happens in DDL or database creation, in...
on Jun 17, 2014
In JSF you will see people from time to time use rendered="false". But what does it mean? Well, because in JSF the actual request is page based it builds up a representation of the page when the page gets loaded. When it is building up this representation it builds up the entire page, even the parts that are not going to be rendered. Eg.   ...  <h:body>    &...
on Jun 3, 2014
Server-Sent Events (SSE) is part of HTML5. SSE is a simple, undirectional communication from server to browser. It allows server to push data to client once a connection is established. The entire point of SSE is to make it easy for the server to push messages to the browser, once the browser has first established a connection to the server. These messages are of the form "field: value" with...
on May 21, 2014
In every JSF application view state is kept either on the client or on the server. How do you make sure this state is smaller? The 'com.sun.faces.compressViewState' comes in handy here. It makes it so that the Mojarra runtime will Gzip compress the view state. Note the context-param is set by default to true, so only if you want to turn it off you will need to do something. In your web.xml file...
on Feb 12, 2014
Today we are covering what the "com.sun.faces.sendPoweredByHeader" context-param does. Historically the JSF runtime would send the "X-Powered-By" servlet response header that would tell what the backing engine was (for Mojarra 2.2.x it would show "JSF/2.2"). To make it possible to turn this on or off this context-param was introduced. From a security perspective it would be smart to keep it off...
on Feb 11, 2014
The "com.sun.faces.validateXml" context-param makes it possible for you to have the Mojarra JSF runtime verify your configuration files against the faces-config.xml schema. If an error is found you will immediately be made aware as deployment will fail until you fix the problem. Note when you are ready to go to production the "com.sun.faces.validateXml" context-param should be set to "false". In...
on Feb 7, 2014
By convention in Faces Flows the page that is the start node has the same name as the flow, but is it possible to change that? It sure is, read on! We'll dive into the Faces configuration file that will make this work. <faces-config version="2.2"              xmlns=""...
on Feb 6, 2014
The JavaEE team at Oracle has been busy processing the feedback from the JavaEE 8 Community Survey Question 6 in part one of the survey reads: "Is there any one de-facto standard technology in this space [Server side web MVC framework, aside from JSF] to which we should look for inspiration". For those respondents that answered yes to that question, fully half of them cited Spring MVC. By way...
on Jan 13, 2014
Why would you add a placeholder component to the tree using ui:component? Well, sometimes you need to add content dynamically, but you also need to be able sure where it ends up. Why would you need to know where it ends up? Well imagine the following scenario   <ui:component id="component1">    <ui:include rendered="#{myBean.include1Yes}"...
on Jan 2, 2014
Occasionally, users have the need to override the version of JSF included in the application server by bundling a different version of JSF with their application. If you are trying to use CDI in such a scenario, you might have noticed it does not work. Is there a way out? Yes, there is, by including a small JAR and some configuration in your web application you can make this scenario work. Add...
on Dec 10, 2013
To make it possible to debug the view tree the JSF runtime has a debug component (ui:debug) that you can use. What is the best way to do this? Add the ui:debug component to the bottom of your page and activate it only in Development mode. This makes it available when the application needs to be debugged, but it does not put a burden on a Production application.   <ui:debug rendered=...
on Dec 9, 2013
How do you convert a date in JSF? The example below outputs the date using the long date style <?xml version='1.0' encoding='UTF-8' ?><!DOCTYPE html><html xmlns=""      xmlns:h=""      xmlns:f="
on Dec 6, 2013
If you have ever wondered which version of Mojarra is running on the container you can determine what version is running using a simple piece of code. How? The following code snippet shows you how!   FacesContext.getCurrentInstance().getClass().getPackage().getImplementationVersion() And that is it. Enjoy!
on Dec 4, 2013
Hurray, 50 JSF tips! For your convenience I have prepared a JSF tips bitly bundle that links back to them all. See And that is it. Enjoy!
on Dec 3, 2013
Ever wondered how you would use a composite component within a composite component? Or is it not possible? It most certainly is possible, so lets see how! First we define level 2 (the deepest nesting) <?xml version='1.0' encoding='UTF-8' ?><!DOCTYPE html><html xmlns=""      xmlns:h="...
on Dec 2, 2013
In the previous blog entry we touched upon packaging a custom converter. Now we'll describe what you need to do to use it. Add the maven dependency to your project.         <dependency>            <groupId>org.glassfish-samples.jsf</groupId>      ...
on Nov 27, 2013


Just in case you missed it, see for a roadmap for Glassfish 4.0.1 Enjoy!
on May 23, 2014

Java Web Services and XML

It actually happened a few weeks ago already, but I simply didn't find the time to spread the word earlier -- just too much other stuff to do (see end of posting), so I tell you now: WebDAV Support for JAX-RS 1.2 is out! What has happened since 1.1? First of all, 1.2 is a complete internal overhaul, which not only finally is covered with unit tests rather completely (which revealed several...
on Mar 1, 2014

Java Patterns

The new version of Easy-Cassandra, the version 2.0.1, have launched, some news are: Refactoring constructor on Session Factory QueryBuilder (InsertBuilder, UpdateBuilder, DeleteBuilder, SelectBuilder and BatchBuilder) Go faster both write and read Processors asynchronous More supports to Spring-Data As have an easier the configuration a Session Factory, it was made the ClustInformation, this...
on Feb 13, 2014


This is my first blog on! Happy new year! At 2014/01/11, A big Java EE 7 event has been held on China Nanjing Software Valley jointly organized by China (Nanjing) Software Valley Joint Management Committee and China Nanjing Java User Group. ChinaNanjingJUG( is founded at 2013, and focus on the promotion of Java EE and Java related technology into China....
on Jan 13, 2014