Insights into Java Server Faces


Reduced session size with empty Maps/Lists taking zero bytes space allocation

Filed under: Java, JSF — Hanspeter @ 23:03

It’s quite a while since my last post and this one is related to JSF but not only, it might also be usefull for other use cases. I will show a way to not allocate any space for empty collections (mainly Lists/Maps) unless a first entry is added – and that in a way that is fully transparent for the using part of the Map/List. This helps to keep managed beans containing data as small as possible and therefore allows to reduce session size. (more…)



Combine multiple properties files into one ResourceBundle

Filed under: Java, JSF — Hanspeter @ 20:54

Sometimes it would be nice to combine multiple properties files into one single ResourceBundle. For example, a part of the resources is provided by some library and another part of the resources should be provided by the application using that library.


Blog at