@cbaker1945 Standing in the corner is old school and not an effective way to teach kids how to behave. Especially if your definition of 'a good while' is more then 5 - 10 minutes.
A conversation should be had with the boys about hygiene, waste from our body has bacteria and germs that can harm others and the fact that public urination is a crime.
A suitable punishment would be making the boys clean the toilets at the place you are staying on vacation and talking them through it whilst reiterating the hygiene aspect to them.