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 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

Java Enterprise

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="http://xmlns.jcp.org/xml/ns/javaee"...
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="http://www.w3.org/1999/xhtml"      xmlns:h="http://java.sun.com/jsf/html"      xmlns:f="http://java.sun.com/jsf/...
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 http://bitly.com/bundles/o_7q05ovp05f/2 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="http://www.w3.org/1999/xhtml"      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 like a composite component you might want to distribute a converter, but how would you package it? Easy, read the rest down below! The converter package customconverter;import javax.faces.component.UIComponent;import javax.faces.context.FacesContext;import javax.faces.convert.Converter;import javax.faces.convert.FacesConverter;@FacesConverter(value = "customConverterId")public...
on Nov 26, 2013
When you developed a composite component the namespace you would be seeing would look like "http://java.sun.com/jsf/composite/xxxxxx". But what if you are not allowed to use it that way or you just do not like it, is it possible to change that? Yes it is possible. This blog entry shows you how. The composite component <?xml version='1.0' encoding='UTF-8' ?><!...
on Nov 22, 2013
In the previous blog entry we set the stage on how to package a composite component in a JAR. Now we are going to use it! Add the dependency to the POM         <dependency>            <groupId>org.glassfish-samples.jsf</groupId>        ...
on Nov 21, 2013
If you want to share a composite component between projects you should package it in a JAR. But how would you do it? Well it is pretty easy. First include the resources in the META-INF/resources directory. E.g. <?xml version='1.0' encoding='UTF-8' ?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/...
on Nov 20, 2013

JCP

This is my first blog on java.net! 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(http://q.weibo.com/1696581) is founded at 2013, and focus on the promotion of Java EE and Java related technology into China....
on Jan 13, 2014