If it can only be put in the dormitory, it is recommended not to let it out.
It is convenient for rabbits to be in a fixed place. When he has finished urinating, you can train him by pointing at the urine. It is ok to hit him once or twice, but it is not recommended to hit him too hard.
If he has been urinating for a long time, you can't beat him after cleaning up.