A body cavity is a space between the gut tube (lined with endoderm) and the body wall (with its outer covering of ectoderm). Such a body cavity, or coelom<span>, can be formed in two ways. </span>A true coelom<span> is formed within the mesoderm layer; thus, the </span>true coelom<span> is entirely lined with mesoderm.</span>