implement JP_PRE_OUTPUT_IN_HEADER