If the jury be of opinion for the plaintiffs, or any of them, the verdict shall be for the plaintiffs or such of them as appear to have the right to the possession of the premises, or any part thereof, and against such of the defendants as were in possession thereof, or exercised acts of ownership thereon, or claimed title thereto or any interest therein, at the commencement of the action. Where any plaintiff appears to have no such right, the verdict as to such plaintiff shall be for the defendants. If the action be against several defendants, and a joint possession of all be proved, and the plaintiff be entitled to a verdict, it shall be against all, whether they plead separately or jointly.