GWTII-193: make print depend on server + delete duplicate common part