String versus slab: energy and momentum distribution