
644 N.W.2d 865 (2002)
263 Neb. 971
The KANSAS BANKERS SURETY COMPANY, Appellant,
v.
Linda HALFORD, Appellee.
No. S-00-1214.
Supreme Court of Nebraska.
May 31, 2002.
*866 Edmond E. Talbot, III, Blair, of Talbot Law Office, and Stephen D. Lanterman, Topeka, KS, and Alan V. Johnson, of Sloan, Listrom, Eisenbarth, Solan & Glassman, L.L.C., for appellant.
David S. Houghton and William G. Garbina, of Lieben, Whitted, Houghton, Slowiaczek & Cavanagh, P.C., L.L.O., Omaha, for appellee.
HENDRY, C.J., WRIGHT, CONNOLLY, STEPHAN, McCORMACK, and MILLER-LERMAN, JJ.
WRIGHT, J.

NATURE OF CASE
The Kansas Bankers Surety Company (KBS), which is the surety company for Fort Calhoun State Bank (the Bank), brought an action against Linda Halford (Halford) claiming fraud and conversion of funds. After KBS voluntarily dismissed its action against Halford, the district court awarded Halford attorney fees pursuant to Neb.Rev.Stat. § 25-824 (Reissue 1995). KBS timely appealed.

SCOPE OF REVIEW
The question of jurisdiction is a question of law, upon which an appellate court reaches a conclusion independent of the trial court. Kovar v. Habrock, 261 Neb. 337, 622 N.W.2d 688 (2001).

FACTS
In December 1997, the Bank made demand upon KBS for repayment of a loss, pursuant to the terms and conditions of a financial institution bond issued by KBS to the Bank. The Bank asserted that Halford, its former employee, had committed fraudulent and dishonest acts which caused the Bank to sustain a loss in the amount of $35,085.41. After it paid the bond, KBS took an assignment of the Bank's claim against Halford and sued her for fraud and conversion.
The Bank's president, John Ramsey, and its vice president, Paul Oestmann, signed a sworn statement dated October 30, 1998, which alleged that on July 8, 1991, a 12 month renewable certificate of deposit, No. 711640, was opened by Dorothy Sievers with an initial deposit of $25,200. The authorizing signature for the *867 Bank on the certificate of deposit was that of Halford, who was the head teller of the Bank until her resignation in April 1996. The Bank's trial balance dated July 11, 1991, listed the certificate of deposit under Sievers' name, and the trial balance indicated a " `Last Dep Date' of `07/07/91.'"
The sworn statement alleged that in October 1997, when Sievers presented a request to change the title on the certificate of deposit, bank records indicated there was no certificate of deposit No. 711640 outstanding. An investigation revealed that on July 8, 1991, certificate of deposit No. 711640 was issued to " `RF Broadband,' " which was a doing-business-as name used by Darrell Halford, the brother-in-law of Halford. Ramsey and Oestmann claimed that the authorizing signature for the Bank on the certificate of deposit was Halford's.
The sworn statement further alleged that two of the Bank's " `Proof of Deposit Listing[s]' " dated March 8, 1996, noted that a debit was made to "account # XXXXXX for $29,701.60" and that a credit was made to "Firstier (First Bank)Omaha account number XXXXXX" for the same amount. The Bank's " `General Ledger Transaction Register' " noted a credit to First Bank account No. 112151 on March 8 which allowed account No. 112151 to balance with the general ledger and reflect no reconciling items. First Bank's statements for March 4 through 15 do not note a transaction for the amount in question.
According to the Bank's " `Certificate of Deposit Maintenance Journal' " dated April 8, 1996, the name on certificate of deposit No. 711640 was changed to Darrell Halford, and the change was made from Halford's computer terminal. On July 16, 1996, an " `Indemnity Agreement for Missing Instrument' " was executed for certificate of deposit No. 711460 in the amount of $1,407.77, which closed the account.
The sworn statement of Ramsey and Oestmann further alleged that dishonest and fraudulent acts were committed by Halford with the intent to cause the Bank a loss. The Bank reimbursed Sievers in the amount of $35,085.41, which represented the original certificate of deposit amount plus interest earned from July 8, 1991, through December 31, 1997.
The Bank hired an accounting firm to conduct an examination and assist the Bank with filing an employee dishonesty claim under the terms of the Bank's financial institution bond with KBS. The report was intended for use by the Bank's board of directors, KBS, and other authorities in the investigation of the claim. The report stated in part:
In summary, bank management feels that the $29,701.60 noted above has been taken from the bank. In addition, bank management feels the $1,409.03 redeemed to Darrell Halford was in error. Bank management believes that there were two Certificate of Deposits [sic], the original issued to Ms. Dorothy Sievers in July 1991 and a second, fraudulent certificate of deposit issued in the name of RF Broadband. Management believes only Linda Halford is involved in the fraudulent activities as supported by: (1) Ms. Halford's signature on each of the Certificates of Deposits [sic] issued, (2) the change in the Certificate of Deposit name initiated by Ms. Halford as indicated on the" Certificate of Deposit Maintenance Journal", and (3) the discrepancies noted in reconciling the First Bank of Omaha and First National Bank accounts.
Bank management wrote-off $35,085.41 at December 31, 1997, which represents the original Certificate of Deposit amount plus interest earned through December 31.
In October 1998, KBS paid the Bank $30,085.41, which represented the Bank's *868 payment to Sievers less a $5,000 deductible. On November 19, an attorney for KBS wrote to Halford informing her that the Bank believed she was responsible for an unauthorized transfer of funds from Sievers' certificate of deposit. KBS formally demanded that Halford repay the $30,085.41 and informed her that it was preparing to file a lawsuit against her. KBS also requested any information that "would indicate any matters contrary to those set forth in this correspondence."
Through her attorney, Halford denied any wrongdoing and noted the lack of detail contained in the claim. Her lawyer stated: "We assume that such serious allegations have not been made without some independent investigation on behalf of the Bank and by your client." Halford requested access to information from any investigations conducted and the names of any persons to whom the allegations had been communicated.
Upon review of the documents in KBS' possession, Halford denied the allegations and specifically denied that her signature was on the certificate of deposit issued to RF Broadband. Both Halford and her brother-in-law, Darrell Halford, agreed to submit handwriting exemplars. Halford maintained that after a full and complete investigation, both the Bank and KBS would conclude that she was not involved in any loss or defalcation.
In a memo to KBS and the Bank, Darrell Halford stated that he and his wife had questioned an interest statement they received on June 11, 1996. He stated that Oestmann "assured [them] that [the $1,409.03 payment] was a past interest error on the bank's fault from a previously redeemed CD and that it needed to be closed out ASAP." Darrell Halford returned the money prior to the filing of this lawsuit on August 24,1999.
In his deposition, Ramsey stated that he initially reported the loss via a suspicious activity report to federal regulators without mentioning any names. After the Federal Deposit Insurance Corporation informed him that he had to provide a name, the report was amended to include Halford's name. Ramsey stated he believed Halford had taken the money because her signature appeared on both the original and the duplicate certificates of deposit and because she was in charge of reconciling the accounts that were out of balance. He had no knowledge of any money that was wrongfully taken from the Bank and admitted that the Bank did not lose funds in connection with the RF Broadband certificate of deposit.
Oestmann stated in his first deposition that the Bank lost money "from the standpoint that cash went out of teller drawers that [the Bank] didn't receive credit back from either correspondent banks, or from customers, or whatever the transactions involved." Oestmann was responsible for checking the reconcilements of the general ledger accounts, but he had no evidence that Halford was responsible for any of the "cash-outs" posted against the general ledger accounts that did not have offsetting entries.
In Oestmann's second deposition, he admitted that he had previously reported false information to make a reconciliation appear to be accurate when in January 1996, he told the accountants that $27,800 had been withdrawn from a certificate of deposit on October 30, 1995, when no withdrawal had actually been made. He reiterated his belief that Halford caused the Bank to lose $35,085.41 because it was her responsibility to reconcile the general ledger accounts and that the Bank suffered a loss because the accounts were out of balance.
On May 25, 2000, Halford proposed a settlement in which KBS would dismiss the lawsuit with prejudice and KBS and *869 the Bank would issue a letter of apology and pay Halford $25,000. After Oestmann admitted on June 12 to "fudg [ing] a reconciliation" to "get the auditors out of the bank," Halford offered to dismiss her claims against KBS and seal the records in exchange for $100,000.
In a letter dated July 20, 2000, KBS rejected Halford's offer. Because the Bank could directly trace only $21,527.65 of the $29,701.60 KBS believed was taken, it proposed that Halford pay $21,527.65 and that she would not have to admit to any wrongdoing. Halford refused the offer.
KBS then offered to settle for $1,600.85, which offer was also rejected. Halford's subsequent counteroffer included a $250,000 payment to her and a written apology.
In mid-July 2000, KBS' certified document examiner provided a preliminary opinion that the duplicate certificate of deposit contained Halford's signature. However, on August 2, the document examiner concluded that Halford had not signed the duplicate certificate. The examiner was unable to rule out the possibility that Oestmann's handwriting was on the duplicate certificate.
On August 2, 2000, KBS mailed its motion to dismiss this action with prejudice, and the district court filed the order on August 4. On August 10, Halford filed a motion for attorney fees and costs pursuant to § 25-824. At the hearing on Halford's motion, KBS claimed the court lacked jurisdiction because the motion had not been filed until after the action had been dismissed.
The district court found that the lawsuit against Halford was frivolous as a matter of law and awarded fees and costs in the amount of $59,211.74. This award included attorney fees for the services of Frank Starr III, an attorney who, at the time of this lawsuit, was not licensed to practice law in Nebraska. KBS appeals.

ASSIGNMENTS OF ERROR
KBS assigns as error that the district court erred (1) in failing to find that it lacked jurisdiction to consider the motion requesting attorney fees and costs, (2) in making any award of attorney fees and costs, and (3) in awarding attorney fees for the services of Starr.

ANALYSIS
Halford sought attorney fees and related costs pursuant to § 25-824, which provides in part:
[I]n any civil action commenced or appealed in any court of record in this state, the court shall award as part of its judgment and in addition to any other costs otherwise assessed reasonable attorney's fees and court costs against any attorney or party who has brought or defended a civil action that alleges a claim or defense which a court determines is frivolous or made in bad faith.
As a general rule, attorney fees and expenses may be recovered in a civil action only where provided for by statute or when a recognized and accepted uniform course of procedure has been to allow recovery of attorney fees. Salkin v. Jacobsen, 263 Neb. 521, 641 N.W.2d 356 (2002).
Halford claims that KBS is responsible for her costs, including attorney fees, and that the dismissal was ineffective because KBS did not pay any costs, as required by Neb.Rev.Stat. § 25-602 (Reissue 1995). Alternatively, Halford argues that the district court had the power to vacate and modify the judgment. She asserts her motion was an attempt to modify the judgment of dismissal to include attorney fees and costs.
*870 KBS argues that the district court lacked jurisdiction to consider the motion for attorney fees and costs because the motion was not filed until after the action had been dismissed and Halford failed to move to vacate the dismissal. Before reaching the legal issues presented for review, it is the duty of an appellate court to determine whether it has jurisdiction over the matter before it. Trainum v. Sutherland Assocs., 263 Neb. 778, 642 N.W.2d 816 (2002). The question of jurisdiction is a question of law, upon which an appellate court reaches a conclusion independent of the trial court. Kovar v. Habrock, 261 Neb. 337, 622 N.W.2d 688 (2001).
At the time the action was dismissed, Halford had not filed a motion for attorney fees based on her claim that the action was frivolous. Halford's motion for summary judgment was pending, and KBS had requested an extension to August 4, 2000, to file its brief. On August 4, KBS' motion to dismiss was filed, and the district court (without assigning costs) entered an order dismissing the action with prejudice. Halford did not attempt to set aside the dismissal.
In deciding whether the district court had jurisdiction to enter an award for attorney fees after KBS' action had been dismissed, we must first address whether KBS had the right to dismiss its action. We have previously held that a plaintiff may enter a dismissal as a matter of right at any time before final submission of the case. See, Collection Specialists v. Vesely, 238 Neb. 181, 469 N.W.2d 549 (1991); Miller v. Harris, 195 Neb. 75, 236 N.W.2d 828 (1975); Feight v. Mathers, 153 Neb. 839, 46 N.W.2d 492 (1951). In Horton v. State, 63 Neb. 34, 40, 88 N.W. 146, 148 (1901), the court, in seeking to clarify when the court may exercise its discretion in refusing to dismiss an action, stated: "This discretion has been exercised to require payment of costs." In Blue River Power Co. v. Hronik, 116 Neb. 405, 217 N.W. 604 (1928), the court held that the injury occasioned by the dismissal must be such as to deprive a defendant of some substantial right not available in a second suit, or that may be endangered by the dismissal.
This court has recognized exceptions to the right of a plaintiff to dismiss an action where it is necessary for the protection of any rights which have accrued to the defendant as a result of the bringing of the action. See Feight v. Mathers, supra. In Mathers, we stated:
"We are of the opinion that the only discretion which may be exercised in the matter is the protection of any rights which have accrued to defendant as a result of the bringing of the action, such as the preservation of a counterclaim, the restitution of property of which he has been deprived, the recovery of his costs, and the like; that in the absence of such considerations the right to dismiss is absolute; that the expense of employing attorneys in defending the action, or the liability to further litigation over the same matter, are not subjects calling for the exercise of discretion by the court as constituting legal prejudice to defendant."
153 Neb. at 845, 46 N.W.2d at 495. See, also, United States Fire Ins. Co. v. Affiliated FM Ins. Co., 225 Neb. 218, 403 N.W.2d 383 (1987); Miller v. Harris, supra; Gebhart v. Tri-State G. & T. Assn., 181 Neb. 457, 149 N.W.2d 41 (1967), overruled on other grounds, Neumeyer v. Omaha Public Power Dist., 188 Neb. 516, 198 N.W.2d 80 (1972); Giesler v. City of Omaha, 175 Neb. 706, 123 N.W.2d 650 (1963).
In Giesler, an action was commenced for a declaratory judgment to have an Omaha city ordinance declared unconstitutional. Two parties intervened. The City *871 of Omaha was the only defendant. After the issues were determined and the case was set for trial, the plaintiff and the intervenors dismissed their respective petitions, and the city objected. The court dismissed the petitions but directed the trial to proceed on the issues raised by the amended answers of the city. This court reversed with directions to dismiss the entire action. We stated that the nature of the city's pleading was controlling in determining the correctness of the court's order retaining the case for trial. The answer prayed for an order dismissing the plaintiff's petition and a denial of the plaintiff's requested relief. In an amended answer, no prayer for relief was included.
We noted that by the terms of Neb.Rev.Stat. § 25-603 (Reissue 1995), a defendant who has presented a setoff or counterclaim may proceed with the trial of his claim irrespective of the plaintiff's dismissal, but the setoff or counterclaim must state a cause of action against the plaintiff. In Giesler, the defendant's answer stated no cause of action against the plaintiff and asserted only a defense. We concluded that the dismissal by the plaintiff and the intervenors had the effect of withdrawing the entire case from the trial court's consideration and that the court erred in proceeding with the case after the filing of the dismissals.
Accordingly, we conclude that KBS had a right to dismiss the lawsuit because Halford had not filed a setoff or counterclaim. There was no relief requested by Halford that was pending at the time of KBS' dismissal other than her motion for summary judgment requesting that KBS' action be dismissed.
Next, we address whether the district court could properly order payment of attorney fees after dismissal. In Salkin v. Jacobsen, 263 Neb. 521, 641 N.W.2d 356 (2002), we specifically addressed the time in which a party may move for attorney fees pursuant to § 25-824. We deemed it significant that § 25-824(2) authorizes a court to award attorney fees as part of a judgment in addition to other costs when it determines that an action or defense is frivolous or made in bad faith.
An award of costs in a judgment is considered a part of the judgment. See In re Application of SID No. 384, 256 Neb. 299, 589 N.W.2d 542 (1999). "It logically follows that a party seeking an award of attorney fees pursuant to § 25-824 for services rendered in a trial court must make such request prior to the judgment in order for the award of fees, if deemed appropriate, to be made a part thereof." Salkin, ante at 526, 641 N.W.2d at 360. Salkin therefore requires that a party seeking attorney fees in the trial court must make the request prior to the judgment in order for any award of fees to be a part of the judgment.
Halford asserts that the dismissal was ineffective because KBS did not pay any costs. Section 25-602 provides:
The plaintiff, in any case pending in the district or Supreme Court of the state, shall, when no counterclaim or setoff has been filed by the opposite party, have the right in the vacation of any of said courts to dismiss his said action without prejudice, upon payment of costs, which dismissal shall be, by the clerk of any of said courts, entered upon the journal and take effect from and after the date thereof.
We have recognized the discretion of the trial courts to refuse such a dismissal or to require the payment of costs. See, Feight v. Mathers, 153 Neb. 839, 46 N.W.2d 492 (1951); Blue River Power Co. v. Hronik, 116 Neb. 405, 217 N.W. 604 (1928). However, no Nebraska case addressing the right of a party to dismiss pursuant to Neb.Rev.Stat. § 25-601 (Reissue 1995) has *872 required the party to pay costs pursuant to § 25-602.
We conclude that § 25-602 is not applicable in this case because the district court entered the order dismissing the action without assessing costs to KBS. Furthermore, without a motion for attorney fees pending, such fees would not have been part of the costs to be paid under either § 25-601 or § 25-602.
The district court did not require the payment of costs or refuse to grant the dismissal. Halford's answer prayed for dismissal at KBS' costs and such other relief as may be just and equitable. Halford had no pending motion for attorney fees, nor did she allege that KBS' cause of action was frivolous. Once the court dismissed KBS' action with prejudice, nothing remained for the court to decide. Thus, the court lacked jurisdiction to award Halford attorney fees and costs.

CONCLUSION
For the reasons set forth herein, the district court's award of attorney fees and costs is vacated, and the appeal is dismissed.
VACATED AND DISMISSED.
GERRARD, J., participating on briefs.
