The rights of the several parties, plaintiffs as well as defendants, may be put in issue, tried, and determined in a partition action. Where a defendant fails to answer, or where a sale of the property is necessary, the title shall be ascertained by proof to the satisfaction of the court before the judgment for partition or sale is given.