The key to preventing this disaster is to wrap your ham in aluminum foil before placing it in your oven. This will keep the moisture in the ham by holding onto the steam.
The ham should be wrapped in foil and placed cut-side down in a roasting pan. Some chefs advise loosely wrapping the meat without letting the foil fully touch the ham.
Whether you wrap the ham lightly, tightly, or with the entire pan, the idea behind using foil is to seal in the steam and the juices to create a moister, better-tasting ham.