
55 N.J. Super. 583 (1959)
151 A.2d 404
TOWNSHIP OF BRICK, OCEAN COUNTY, A MUNICIPAL CORPORATION, ETC., ET AL., PLAINTIFFS-RESPONDENTS,
v.
HARRY VANNELL, ET AL., DEFENDANTS, AND JOSEPH McCARTHY AND HELEN McCARTHY, DEFENDANTS-RESPONDENTS, AND POINT PLEASANT MANOR BUILDING CO., DEFENDANT-APPELLANT.
Superior Court of New Jersey, Appellate Division.
Argued March 16, 1959.
Decided May 18, 1959.
*586 Before Judges GOLDMANN, FREUND and HANEMAN.
Mr. John Warren, Jr., argued the cause for appellant (Mr. Theodore D. Parsons, of counsel; Messrs. Parsons, Labrecque, Canzona & Combs, attorneys).
Mr. Harold A. Schuman argued the cause for plaintiffs-respondents (Messrs. Haines & Schuman, attorneys).
*587 The opinion of the court was delivered by HANEMAN, J.A.D.
Point Pleasant Manor Building Co. (Point Pleasant) appeals from a summary judgment entered upon plaintiffs' motion in a suit for possession of certain lands situate in Brick Township.
Plaintiffs have included in the counter-statement of facts on this appeal references to the record at the trial and to the opinion of this court in a prior suit between these parties, Pt. Pleasant Manor Building Co. v. Brown, 42 N.J. Super. 297 (App. Div. 1956), certification denied 23 N.J. 140 (1957). They assert that we may take judicial notice of those proceedings. Point Pleasant has moved to strike those references, basically upon the ground that the record of the prior proceeding was neither offered in evidence nor considered by the trial court in the present action. A review of the opinion of the trial court on plaintiffs' motion for summary judgment dispels any doubt that it relied upon the facts adduced in the prior proceedings in reaching the conclusion to grant plaintiffs' motion. (Note, also, that the same trial judge sat in both cases.) Even though the trial court had not so relied, a consideration of the record of the prior proceedings is vital to the resolution by this court of the issue framed on the motion. On their motion, plaintiffs raised the issue of res judicata. The solution of that issue, which is the fiber of the motion, must be predicated upon a careful study of the entire record of the prior proceedings. Only then can the court determine the scope of the prior judgment. See Robinson-Shore Development Co. v. Gallagher, 26 N.J. 59, 67-76 (1958); Nystrom v. Pennycook, 29 N.J. Super. 456, 461 (App. Div. 1954). There is no doubt that we may take judicial notice of the record of the prior proceeding, see Taylor v. New Jersey Highway Authority, 22 N.J. 454, 459 (1956); In re Selser, 15 N.J. 393, 401 (1954), including the recorded testimony of witnesses; In re Breckwoldt, 22 N.J. 271, 275 (1956). The better practice, however, is to offer the record, judgment and transcript of the prior proceedings as an exhibit in the *588 matter before the trial court, see Russell v. Tenafly Bd. of Adjustment, 53 N.J. Super. 539 (App. Div. 1959); Locher v. Locher, 112 N.J. Eq. 25 (Ch. 1932), or to include in the appendix so much thereof as may be material to the resolution of the issues raised on appeal. In a similar situation, where the record was not offered below, Robinson-Shore Development Co. v. Gallagher, supra (26 N.J. at page 68), the court said:
"In this connection, it might be noted that we have found the excerpts of the record of the proceedings in Ocean City Association v. Cresswell, supra, contained in the present record lacking in several respects and we have obtained and utilized the entire record in the cause of Ocean City Association v. Cresswell, supra, as contained in the bound volume (vol. 306) of the record in the Court of Errors and Appeals for the year 1906."
In 1955 Point Pleasant commenced an action in the Law Division seeking a judgment declaratory of its rights in and to the identical lands here involved. The judgment of the trial court in that cause declared that these same lands were "dedicated for the use of the public and of the school district of the Township of Brick and the Township of Brick." Plaintiffs' complaint was dismissed. On appeal, that judgment was affirmed, Pt. Pleasant Manor Building Co. v. Brown, supra. The Supreme Court denied Point Pleasant's petition for certification (23 N.J. 140). For further factual background consult the opinion of this court on the prior appeal (42 N.J. Super. 297).
Thereafter, plaintiffs commenced the action from which stems the present appeal. They sought possession of the dedicated tract, including houses erected thereon by Point Pleasant. Point Pleasant, Joseph and Helen McCarthy and four other parties who had purchased portions of the dedicated lands from Point Pleasant, were made defendants to the action. Only Point Pleasant and the McCarthys filed answers. Judgment by default was entered against the four remaining named defendants. Point Pleasant appealed. The *589 McCarthys cross-appealed but have since abandoned the cause. Thus, only the Point Pleasant appeal is before us.
In its answer Point Pleasant admitted the prior judgment. It raised the following affirmative defenses: (1) plaintiffs were guilty of "inequitable acts" and by reason of their attempts to unjustly enrich themselves are not entitled to possession until they have adequately and properly compensated defendant for the buildings; (2) the lands in question are neither suitable nor adaptable for the dedicated purposes; (3) Point Pleasant has offered to convey ten acres in lieu and in place of the lands here involved, and plaintiffs' refusal to accept is oppressive, harassing and inequitable and for the sole purpose of unjustly enriching themselves; (4) plaintiffs are estopped by their actions  which consist in (a) their approval of a subdivision map of these lands; (b) their issuance of building permits; (c) their remaining silent during the construction of houses by Point Pleasant; (d) their inspection of the premises and the issuance of certificates of occupancy; (e) their acceptance in the school system of children residing in the houses constructed on the lands; (f) their furnishing fire and police protection to defendants  from now demanding the relief sought; (5) Point Pleasant's construction of houses on the lands in question was done in good faith and under the mistaken belief of a right to so construct.
The pretrial order discloses that by way of counterclaim Point Pleasant demanded a judgment enjoining plaintiffs' interference with its possession of that tract or, alternatively, (1) compelling plaintiffs to compensate it for the value of the improvements constructed upon said lands or permit the removal of the buildings by defendants, or (2) directing plaintiffs to accept another tract of land in exchange for that previously dedicated. Defendants also asked for "such other relief as may be just and equitable."
The defenses fall into two categories: (1) plaintiffs are estopped from obtaining possession by the acts of their public officials; (2) plaintiffs should compensate Point Pleasant *590 for the reasonable cost of the improvements made by it upon the land.
Plaintiffs urge here, as in the trial court, that defendant is estopped from asserting the above defenses and from obtaining any relief on its counterclaim by virtue of the prior judgment referred to above.

I.
Plaintiffs argue that Point Pleasant is estopped from asserting the foregoing defenses, since those issues are res judicata, having been disposed of in the prior litigation. Res judicata, in a strict sense, applies only where a second suit involves the same cause of action, parties or their privies, and issues as were involved in a prior suit. Although the present suit involves the same parties or their privies, it is different from the prior suit in that it is a suit for possession, whereas the prior suit was for a declaratory judgment. The applicable doctrine is, therefore, not res judicata but rather estoppel by judgment. This rule has been defined in Restatement, Judgments, § 68, p. 293 (1942):
"(1) Where a question of fact essential to the judgment is actually litigated and determined by a valid and final judgment, the determination is conclusive between the parties in a subsequent action on a different cause of action, * * *.
(2) A judgment on one cause of action is not conclusive in a subsequent action on a different cause of action as to questions of fact not actually litigated and determined in the first action."
Thus, in the present suit defendant is barred, on the doctrine of collateral estoppel by judgment, from raising such questions of fact as were actually litigated in the first suit, but not those which could have been raised but were not. Restatement, Judgments, § 68, comment (a), pp. 293-295 (1942).
Also, where a party having the burden of proof puts a fact directly in issue, but then fails to sustain his burden of proof, he is barred from raising it in the subsequent action. *591 Restatement, Judgments, § 68, comment (f), pp. 302-304 (1942). We have been referred to no New Jersey case dealing precisely with the burden of proof aspect of the rule, but it is an obvious corollary to the rule. Our decisions are clearly in accord with the Restatement rule and analysis. Mazzilli v. Accident & Casualty Ins. Co., etc., 26 N.J. 307, 313-319 (1958), where the cases are collected; Middlesex Concrete Products & Excavating Corp. v. Borough of Carteret, 35 N.J. Super. 226, 236-239 (App. Div. 1955); City of Paterson v. Baker, 51 N.J. Eq. 49, 53 (Ch. 1893), and see generally, 2 Freeman, Judgments, pp. 1453-1560, §§ 689, 690 (5th ed. 1925).
Therefore, if the defenses or claims in the present action depend upon facts which defendant put directly in issue but failed to establish in the prior litigation, it is precluded from raising them now. We conclude that such is the case. The trial court properly considered the several matters raised by way of estoppel to have been determined in the earlier litigation. Indeed, defendant partly concedes as much, but misconceiving the full scope of the doctrine of collateral estoppel, argues that since the factual questions are now presented within the frame of a different legal issue, they may be relitigated. This is, of course, completely erroneous.
One of defendant's main contentions in the present case is exactly the same as was advanced in the prior litigation  that it had not been aware of the dedication statement on the 1950 map. The trial court, as noted, found the proofs advanced in support of that claim unbelievable, and the Appellate Division held that the record supported the trial judge's finding of an intention to dedicate. Since defendant's entire argument that plaintiffs are estopped from demanding possession rests on the premise that it mistakenly erected buildings on land believed to be its own, destruction of the premise carries the argument down with it.
To the extent that one can construe defendant's rather amorphous argument of estoppel to be that plaintiffs are precluded from demanding possession merely because of the *592 acts of the township's agents  and this notwithstanding defendant's knowledge of the dedication  it must be held that defendant is also barred from raising that issue. Its claim of estoppel in the prior action rested on the same theory, i.e., that the acts of the building inspector and the tax assessor precluded the township from contending that there had been a dedication. It failed to discharge its burden of proof on that branch of the case. It now relies on the same facts to bar plaintiffs from demanding possession. The claim would, in this case as in the earlier one, require a finding that the acts of the municipal officials can be attributed to the township, and hence it would be inequitable to allow the township to enforce its rights. Although the right allegedly barred is different in each case (dedication as opposed to possession), the material facts which would constitute the claimed estoppel are the same. Defendant failed to prove them on its first attempt. It is not entitled to a second opportunity to establish them now.
Defendant's claim of estoppel on the ground that children of its purchasers were admitted to the township schools does not appear to have been raised in the first suit. Nevertheless, we find no merit in the argument. Defendant gives no reason why this act should constitute an estoppel. It does not claim that it was prejudiced or misled thereby. The board of education was under an obligation to provide the children of residents of the municipality with educational opportunities, N.J.S.A. 18:14-1, and this regardless of the status of the land occupied by their parents.
In bringing this action plaintiffs have properly pursued the remedy prescribed by law to vindicate the public's right to possession of dedicated lands. Atlantic City v. Groff, 64 N.J.L. 527 (Sup. Ct. 1900); Hohokus Tp. v. Erie R. Co., 65 N.J.L. 353 (Sup. Ct. 1900). That right may not be diminished by reason of the fact that defendant building company is the legal owner of the fee, or has conveyed a part or all of it to others. Hoboken Land and Improvement Co. v. Mayor, etc., of City of Hoboken, *593 36 N.J.L. 540, 543 (E. & A. 1873). Plaintiffs are clearly entitled to possession of the premises in question.

II.
The answer seeking to predicate any relief to plaintiffs upon compensation for improvements made by Point Pleasant is so intertwined with the relief sought under the counterclaim that the answer and counterclaim will, in that respect, be considered together.
Point Pleasant concedes plaintiffs' right to possession. All of Point Pleasant's defenses, as well as its counterclaim, are based upon the contention that it was under a misapprehension of law and fact when it constructed various improvements on the dedicated lands, and that those improvements were made with the knowledge and acquiescence of plaintiffs.
Point Pleasant seeks by this means to bring itself within the principle enunciated in the line of cases in which our courts hold that where a stranger to the title of realty, in good faith, under the belief of his ownership, places improvements on said lands with the knowledge of the true owner, the latter will be denied relief in a subsequent suit for possession unless adequate compensation is made to such stranger for the reasonable cost of the improvements. Alternatively, in such a circumstance, the stranger has been permitted to obtain title to the lands upon the payment of the reasonable value thereof to the true owner. For defendant to succeed it is vitally essential that three elements be present: (1) the stranger must have been mistaken in his belief of ownership; (2) such mistake must not have resulted from the stranger's culpable negligence, and (3) the true owner must have had either actual or constructive knowledge of the construction of the improvements and yet remained silent. McKelvay v. Armour, 10 N.J. Eq. 115 (Ch. 1854); Riggle v. Skill, 9 N.J. Super. 372, 379 (Ch. Div. 1950), affirmed 7 N.J. 268 (1951).
*594 At common law there is no right to compensation for improvements mistakenly made on the lands of another. Every occupant makes improvements at his peril, even where he acts under a bona fide belief of ownership. Annotation, 57 A.L.R.2d 263 (1958). In equity recovery has been allowed in a variety of situations upon varied theories: (1) the equitable maxim that he who seeks equity must do equity; (2) unjust enrichment; (3) estoppel. A sine qua non, however, for such relief, in every instance, is the innocence of the improver, i.e., a bona fide belief that he is the owner and has a legal right to make the improvements. See Annotation, 57 A.L.R.2d 263 (1958); Restatement, Restitution, § 42 (1937). Absent such a mistake, the improver is deemed to "officiously" confer a benefit and may not recover. Restatement, Restitution, supra, at 170, comment on subsection (2).
The prior litigation finally adjudicated that Point Pleasant's dedication antedated any construction in May 1953, and is dispositive of its present contention that it undertook the building operation under a mistake of fact or law.
It is clear, therefore, that the two essential ingredients now sought to be litigated have once been tried in a suit between these parties and have been decided against Point Pleasant. The prior suit is dispositive of both the alleged innocent mistake of Point Pleasant and the acquiescence of plaintiffs. Point Pleasant is barred from re-litigating those same issues in the present action and from any relief by way of reimbursement. See Russell v. Tenafly Bd. of Adjustment, supra (53 N.J. Super. at pages 545-546).
By the same token, it should not be permitted to remove the houses constructed upon the subject lands. To grant this relief would be to permit an individual who knowingly breaks the close of an owner to escape scot-free and there would be less reason to respect the sanctity of the right to possession of the true owner, even admitting that the cost of removal might act as some deterrent to the trespasser. Under the facts here present, as determined in *595 the prior litigation, the axiom that he who seeks equity must do equity, and the doctrine of estoppel, are inapplicable. Nor can it be said that plaintiffs would be unjustly enriched by denying Point Pleasant this relief. To accede to the demand of Point Pleasant would constitute a form of restitution for an officious act. The person receiving a voluntary benefit is liable to make restitution only if the circumstances of its receipt or retention are such that, as between the two persons it is unjust for him to retain it. Restatement, Restitution, § 1 and comments (1937). Again, the foregoing analysis of the prior litigation, including Point Pleasant's flagrant disregard of its dedication, exhibits a total absence of any circumstances which would make it unjust for plaintiffs to retain the benefits.

III.
Plaintiffs argue that if their right to possession be conceded, defendant may not interpose equitable defenses. The trial court incorrectly held that defendant could not make such a claim because plaintiffs had brought their action for possession under N.J.S. 2A:35-1 et seq., and were not seeking recovery for occupancy. (N.J.S. 2A:35-2 gives a plaintiff the right to recover any and all incidental damages, including mesne profits, and the full value of the use and occupation of the premises for not exceeding six years before the commencement of the action, during which time the defendant was in possession.) N.J.S. 2A:35-3 provides that where a defendant has in good faith made permanent improvements on the premises, "under circumstances entitling the defendant to have the value thereof allowed to him," the court may allow the same to be set off, "but only to the extent of such damages" as are claimed by plaintiff.
The statute is purely procedural. It expressly refers to a defendant's right to a set-off under circumstances entitling him to damages where the plaintiff seeks damages. It does *596 not purport to define his substantive right to recover damages. The statute, being procedural, is subordinate to any contrary provision found in our rules of court, Winberry v. Salisbury, 5 N.J. 240 (1950).
R.R. 4:79-1 is directly aimed at the elimination of procedural anomalies in actions for the possession of land. It declares that in such actions the "practice and procedure * * * shall be as in other civil actions."
R.R. 4:8-5, a part of the rule (R.R. 4:8) relating to general rules of pleading, states in part that "a party may also state as many separate claims or defenses as he has regardless of consistency and whether based on legal or on equitable grounds or on both." Counterclaims are provided for under R.R. 4:13. R.R. 4:13-1 states:
"A pleading may state as a counterclaim any claim against the opposing party whether or not arising out of the transaction or occurrence that is the subject matter of the opposing party's claim, except that any defendant failing to set off a liquidated debt or demand, or a debt or demand capable of being ascertained by calculation, shall thereafter be precluded from bringing any action for such debt or demand which might have been set off under the provisions of this rule."
R.R. 4:13-2 provides:
"A counterclaim may or may not diminish or defeat the recovery sought by the opposing party. It may claim relief exceeding in amount or different in kind from or not germane to that sought in the pleading of the opposing party."
One of the designs of the Judicial Article of the 1947 Constitution, Art. VI was to facilitate and expedite litigated matters by disposing of all issues, whether legal or equitable, arising in a controversy between litigants in one trial, thereby avoiding multiple trials of the same case. Massari v. Einsiedler, 6 N.J. 303, 307 (1951); Asbestos Fibres, Inc. v. Martin Laboratories, Inc., 12 N.J. 233, 239 (1953); Korff v. G. and G. Corp., 21 N.J. 558, 567 (1956). The Tentative Draft of the Rules Governing the Courts of New *597 Jersey, commenting upon former Rule 3:74-1, now R.R. 4:79-1, stated that the general object of the rule was "to allow a claim for recovery of land to be prosecuted as any other claim is prosecuted in a civil action. Thus, subject to the rules: * * * (c) Equitable defenses may be set up * * *. (d) Legal and equitable counterclaims may be filed. * * *" See Tentative Draft, p. 260; 2A N.J. Practice (rev. ed. 1954), 30. See also, Nystrom v. Pennycook, 29 N.J. Super. 456, 461 (App. Div. 1954), for an example of the application of the rule.

IV.
Point Pleasant has offered plaintiffs a larger, allegedly more suitable tract of land in exchange for the lands formerly dedicated. Plaintiffs have refused to accept the offer. Plaintiffs' right to possession of the dedicated tract, both legal and equitable, has heretofore been decided. Nothing appears in the record which would raise any question on the position taken by plaintiffs as regards the offer of settlement. Plaintiffs have unequivocally rejected that offer. Thus, no agreement is in existence between these parties concerning a settlement of the issue at hand. It follows that there exists no basis, in law or equity, upon which Point Pleasant can predicate a valid agreement of compromise or settlement. The offer and rejection raise no triable issue. The plea of such an offer is no defense to the present action.
Thus, the issues framed on the motion were of law and for the court. No genuine factual issue was raised on the pleadings, affidavits or exhibits. R.R. 4:58. We are of the opinion that the issue was properly decided by the trial judge. The judgment under appeal is therefore affirmed.
