
108 N.J. 59 (1987)
527 A.2d 864
TRANSAMERICA INSURANCE COMPANY, PLAINTIFF-APPELLANT,
v.
NATIONAL ROOFING, INC., EAST ORANGE BOARD OF EDUCATION, UNI-PLAN, A NEW JERSEY PARTNERSHIP, CERAMI CONSTRUCTION COMPANY, POLYLITE ROOF DECKS, INC., W.R. GRACE, INC., OLENICK PLUMBING AND HEATING COMPANY, U.S. FIDELITY & GUARANTY CO., RELIANCE INSURANCE COMPANY, CONTINENTAL INSURANCE CO., NORTH RIVER INSURANCE COMPANY, THE AMERICAN INSURANCE CO. AND AMERICAN NATIONAL FIRE, DEFENDANTS, AND ALL WEATHER CRETE, INC., DEFENDANT-RESPONDENT. TRANSAMERICA INSURANCE COMPANY, PLAINTIFF-APPELLANT,
v.
ALL WEATHER CRETE, INC., DEFENDANT-RESPONDENT, AND EAST ORANGE BOARD OF EDUCATION, UNI-PLAN, A NEW JERSEY PARTNERSHIP, CERAMI CONSTRUCTION COMPANY, NATIONAL ROOFING, INC., POLYLITE ROOF DECKS, INC., W.R. GRACE, INC., OLENICK PLUMBING AND HEATING COMPANY, AND NUMEROUS JOHN DOE INSURANCE COMPANIES PROVIDING GENERAL LIABILITY, COMMERCIAL UMBRELLA LIABILITY AND EXCESS LIABILITY INSURANCE TO ALL WEATHER CRETE, INC. FROM JULY 1, 1975 TO JULY 1, 1983, WHOSE EXACT IDENTITIES ARE YET UNKNOWN, DEFENDANTS.
The Supreme Court of New Jersey.
Argued January 5, 1987.
Decided July 13, 1987.
*61 Edmond R. Casey argued the cause for appellant (Ozzard, Rizzolo, Klein, Mauro, Savo & Hogan, attorneys; Edmond R. Casey and Arthur D. Fialk, on the brief).
Jay D. Rubenstein argued the cause for respondent (Stern, Steiger, Croland, Tanenbaum & Schielke, attorneys; Jay D. Rubenstein and Thomas Loikith, on the brief).
PER CURIAM.
In an unreported opinion, the Appellate Division summarized the factual and legal background of this matter:
This case presents the novel issue of whether the settlement of an underlying lawsuit by an insurer on behalf of its insured and the subsequent mootness dismissal of the insurer's declaratory judgment action against the insured regarding coverage renders the insured a "successful claimant" for R. 4:42-9(a)(6) counsel fee purposes. More particularly, defendant All Weather Crete, Inc. (All Weather Crete) here challenges the dismissal of its counterclaim for counsel fees in a declaratory judgment action brought by its insurer, plaintiff Transamerica Insurance Company (Transamerica), to determine a coverage question. The underlying suit against All Weather Crete which precipitated the declaratory judgment action was settled on All Weather Crete's behalf by Transamerica. The trial judge thereafter dismissed the complaint and counterclaim with prejudice on the basis that the coverage question was moot. All Weather Crete argues that the settlement of the underlying suit and the dismissal of Transamerica's declaratory judgment action rendered it a "successful claimant" entitling it to attorneys fees pursuant to R. 4:42-9(a)(6) and that it should have been afforded a plenary hearing on such fees as requested in its counterclaim. Since we agree that under the facts of this case All Weather Crete was a successful claimant, we reverse and remand the matter to the trial judge for a hearing on that issue.
The case arose in 1980 when the East Orange Board of Education filed a complaint against certain contractors for damages it allegedly sustained as a result of faulty construction on a school roof. One of the original defendants in the case was the roofing subcontractor, National Roofing, Inc. Thereafter the complaint which alleged, among other claims, negligence, breach of warranty, faulty workmanship and defective materials was amended to add All Weather Crete, a subcontractor of National Roofing. All Weather Crete forwarded a copy of the complaint to Transamerica with a request that it assume the defense of the action. Transamerica responded with a reservation of rights letter.

*62 On July 1, 1982 after filing a declaratory judgment action seeking a declaration of no coverage for National Roofing, Transamerica filed a second action seeking a declaration of no coverage for All Weather Crete based on the following policy exclusions:
(d) to property damage ... (7) to work performed by the named insured arising out of the work or any portion thereof, or out of materials, parts or equipment furnished in connection therewith;
(e) to loss of use of tangible property which has not been physically injured or destroyed resulting from ... (2) the failure of the named insured's products or work performed by or on behalf of the named insured to meet the level of performance, quality, fitness or durability warranted or represented by the named insured; ....
In August 1982, All Weather Crete answered and counterclaimed alleging the refusal of Transamerica to defend the action despite the reservation of rights and seeking a declaration that Transamerica was obligated to provide defense and coverage in the Essex County action. On October 1, 1982 Transamerica amended the declaratory judgment complaint against All Weather Crete. The amendment did not alter the claims against All Weather Crete but added new defendants and sought a declaration of insurance coverage for All Weather Crete against various John Doe insurance companies. All Weather Crete responded, essentially repeating the details of the earlier counterclaim with the addition that Transamerica had failed to defend the Essex County action "until recently."
Thereafter discovery was attempted by All Weather Crete on several occasions concerning Transamerica's denial of coverage. These attempts were unsuccessful, culminating in All Weather Crete's January 1984 motion to compel the production of witnesses, to dismiss the declaratory judgment complaint for failure of Transamerica to comply with discovery and for counsel fees. At the hearing on the discovery motion on March 5, 1984, various counsel explained to the trial judge that settlement negotiations were pending in the underlying case in Essex County. At the conclusion of the hearing the trial judge agreed to carry the declaratory judgment actions until April and indicated that All Weather Crete would have its opportunity for discovery, if necessary.
In December 1984, Transamerica moved for judgment dismissing the complaint with prejudice: All Weather Crete moved for entry of judgment on its counterclaim with respect to which it filed an affidavit of attorney's services. At the hearing on the motion on December 21, 1984, the trial judge was apparently advised of the settlement of the underlying action in Essex County to which Transamerica contributed $29,710 on All Weather Crete's behalf. The judge then stated that both declaratory judgment complaints would be dismissed with prejudice as well as All Weather Crete's counterclaim. All Weather Crete argued for attorneys fees; contending that a voluntary dismissal of the complaint with prejudice was a resolution in its favor. The judge ultimately disallowed any claim for fees reasoning that there was no adjudication on the merits since he had dismissed the declaratory judgment actions and counterclaim with prejudice as moot. Orders were entered dismissing the complaints with prejudice and denying All Weather Crete's request for fees. Although *63 these orders recognized that the counterclaim was to be dismissed with prejudice by a separate order, no such order was ever entered. This appeal ensued.
All Weather Crete argues that the dismissal with prejudice of Transamerica's complaint operated as an adjudication on the merits rendering it a successful claimant within the purview of R. 4:42-9(a)(6) so as to create an entitlement to attorneys fees. R. 4:42-9 provides in part:
(a) ... No fee for legal services shall be allowed in the taxed costs or otherwise, except. .. .
(6) In an action upon a liability or indemnity policy of insurance, in favor of a successful claimant.
The purport of this rule is to allow a litigant to recover fees where he or she has obtained a favorable adjudication on the merits on a coverage question as a result of the expenditure of such fees. R. 4:37-2(d) defines the circumstances under which a dismissal with prejudice constitutes an adjudication on the merits:
Unless the order of dismissal otherwise specifies, a dismissal under R. 4:37-2(b) or (c) or any dismissal not specifically provided for by R. 4:37, other than a dismissal for lack of jurisdiction, operates as an adjudication on the merits. [Emphasis added.]
The Appellate Division reasoned that a dismissal for mootness was not one for lack of jurisdiction and, therefore, "was an adjudication on the merits within the meaning of R. 4:37-2(d)." The Court also found that "All Weather Crete was clearly a successful claimant since the reason for the mootness dismissal was that Transamerica finally undertook its defense and indemnification in the underlying suit." We disagree. We granted certification, 104 N.J. 470 (1986), and now modify the judgment of the Appellate Division.
We begin by turning to Federal Rule of Civil Procedure 41b, which similarly provides that a dismissal other than for lack of jurisdiction is on the merits.[1] Under that Rule, a dismissal for mootness has been interpreted consistently as not encompassing an adjudication on the merits. See De Volld v. Bailar, 568 F.2d 1162, 1165-66 (5th Cir.1978). The reason is *64 that the jurisdiction of federal courts is limited under article III, section 2 of the United States Constitution to actual "cases or controversies." Thus, in federal cases, dismissal for mootness is considered a dismissal for lack of jurisdiction. Although federal courts do not have jurisdiction over moot cases, the jurisdiction of New Jersey courts is not necessarily so restricted. Even if a matter is technically moot, our courts may retain jurisdiction if to do so is in the public interest, In re Boardwalk Regency Corp. Casino License, 90 N.J. 361, 368 (1982), or if "the litigants' concern with the subject matter evidence[s] a sufficient stake and real adverseness." Crescent Park Tenants Ass'n v. Realty Equities Corp., 58 N.J. 98, 107 (1971). Hence, we begin by accepting the premise that in the New Jersey courts a dismissal for mootness is not necessarily for lack of jurisdiction.
We therefore acknowledge that a literal reading of Rule 4:37-2(d) could lead, as it led the Appellate Division, to the conclusion that a dismissal for mootness, not being one for lack of jurisdiction, was an adjudication on the merits. A rule of court, like a statute, however, should not be read literally when such a reading defies logic and leads to a result that is contrary to its purposes. See Piscataway Township Bd. of Educ. v. Caffiero, 86 N.J. 308, 317 (1981); see also Westinghouse Elec. Corp. v. Board of Review, 25 N.J. 221, 227 (1957) (courts not limited to reading statute literally). A dismissal for mootness by definition is not an adjudication on the merits. Because there has been no actual adjudication, such a dismissal is more like one for lack of jurisdiction than one after a trial on the merits.
When a court dismisses a matter as moot, it has found there is nothing to adjudicate. In the present case, the trial court believed its dismissal with prejudice was not on the merits, stating "[t]here is no adjudication on the merits." As a result, the trial court declined to decide whether the Transamerica policy covered the claims against All Weather Crete. *65 Additionally, Transamerica's defense of All Weather Crete in the underlying action, as well as its payment of All Weather Crete's share of the settlement, was with a full reservation of Transamerica's rights under the policy. Thus, Transamerica did not concede coverage. Because the trial court did not reach an adjudication on the merits, All Weather Crete cannot be considered a successful claimant. Consequently, we modify the judgment of the Appellate Division and remand the matter to the Law Division.
The ultimate issue on remand is whether counsel for All Weather Crete is entitled to counsel fees and, if so, the appropriate amount of those fees. To resolve that issue, the court must first determine whether Transamerica's policy covered the damages claimed by East Orange. The burden will be on Transamerica to prove that the damages claimed by East Orange fell within an exclusion to the policy. See, e.g., Galbraith v. Hartford Fire Ins. Co., 464 F.2d 225 (3d Cir.1972) (carrier bears burden of proving loss falls within exclusion in policy); Aetna Ins. Co. v. Weiss, 174 N.J. Super. 292, 296 (App.Div.) (burden on insurer to demonstrate no coverage because of exclusion), certif. denied, 85 N.J. 127 (1980). To some extent, requiring determination of coverage in order to determine the insured's entitlement to counsel fees from the insurer is a case of "the tail wagging the dog." Nonetheless, we fail to perceive how that entitlement can be determined without first resolving the question of coverage. See Appleman, Insurance Law and Practice (J. Appleman ed.) § 14533 at 378. Confronted with the unresolved question of counsel fees, therefore, the trial court should not have dismissed the insured's counterclaim. On remand, we encourage the trial court and counsel to devise a practical procedure that will resolve the coverage issue as economically and efficiently as possible. If the court finds that Transamerica's policy afforded coverage, All Weather Crete would be a successful claimant under Rule 4:42-9(a)(6), and the court, in the exercise of its discretion, may determine the appropriateness and amount of any counsel fees to be awarded. *66 Kistler v. New Jersey Mfrs. Ins. Co., 172 N.J. Super. 324, 329 (App.Div. 1980).
The judgment of the Appellate Division is modified to include a determination of the question of coverage, and the matter is remanded to the Law Division.
For modification and remandment  Chief Justice WILENTZ and Justices HANDLER, POLLOCK, O'HERN, GARIBALDI and STEIN  6.
Opposed  None.
NOTES
[1]  Federal Rule 41b provides:

Unless the court in its order for dismissal otherwise specifies, a dismissal under this subdivision and any dismissal not provided for in this rule, other than a dismissal for lack of jurisdiction, for improper venue, or for failure to join a party under Rule 19, operates as an adjudication upon the merits.
