to write messages of good-luck and patriotic slogans on a flag and present it to a newly-enlisted soldier.
During the second world war, it was common for family members, classmates, co-workers, etc. Such flags are called Yosegaki Hinomaru ( Good Luck Flag - Wikipedia, the free encyclopedia flags, or often 'Prayer Flags' or 'Good Luck' flags.
From time to time posters send pictures of Japanese flags with writing on them, asking for help with translation or other information about the flags.