Send cookie in HTML header only if cookies exists. Fixed too properly work
with GlassFish 4, tested with GlassFish 3 and JaxyGen.