
373 So.2d 423 (1979)
Alvin P. COULTER, Appellant,
v.
Frances M. DAVIN et al., Appellees.
No. 78-2020.
District Court of Appeal of Florida, Second District.
July 27, 1979.
*424 Donald W. Belveal, Tampa, for appellant.
Vincent L. Nuccio, Jr., Asst. County Atty., Tampa, for appellees.
DANAHY, Judge.
When final adverse agency action in an administrative proceeding is suffered by a party to the proceeding[1] and that party *425 fails to seek review of the action in the district court of appeal,[2] to what extent is the party foreclosed from obtaining relief in circuit court from such adverse agency action on constitutional grounds?
This case tells us that the answer to this question remains unclear to litigants and trial judges despite repeated judicial efforts to set forth definitive rules for guidance. We believe that the answer to the question should be determined by application of the principle of res judicata; those constitutional issues which could have been raised by the party in a petition to the district court of appeal for review of the agency action are foreclosed and may not be subsequently asserted in a suit for relief brought in circuit court. Those constitutional issues which could not have been determined by the district court of appeal on petition for review of the agency action are not foreclosed.
We note in examining pertinent appellate decisions that the question before us in this case seems nearly always to be raised by motion to dismiss for lack of subject matter jurisdiction. We believe that if litigants and trial judges approach the question as one involving the defense of res judicata, rather than an issue of subject matter jurisdiction, much of the confusion in this area may be avoided.[3] In our view, a circuit court has subject matter jurisdiction of any suit seeking declaratory or other relief against an administrative agency on constitutional grounds. A trial judge is not in the best position to determine whether relief is available when the question is presented to him as one of subject matter jurisdiction, usually raised by motion to dismiss the complaint. Fla.R.Civ.P. 1.140(b). The defense of res judicata, on the other hand, is an affirmative defense which must be specifically asserted in a responsive pleading with sufficient allegations of fact to support it. Thus it appears to us that, both procedurally and analytically, approaching the question presented herein as one of res judicata is preferable.[4]
*426 In this case appellant requested permission from appellees, who are the members of the Hillsborough County Environmental Protection Commission, to partially fill in a body of water known as Sand Pond in order to develop his property for commercial purposes. The Hillsborough County Environmental Protection Act[5] (the Act) contains a definition of water pollution and empowers appellees to regulate water pollution in Hillsborough County within the frame work of the Act. Appellees denied appellant's request for permission to fill in Sand Pond on the ground that such filling constituted water pollution within the meaning of the Act.
The Act provides that every order of appellees under the Act is legally enforceable and binding, and is reviewable only in accordance with the Administrative Procedure Act, Chapter 120, Florida Statutes. Section 120.68 provides for review of final agency action by the district court of appeal. Appellant did not file a timely petition in this court for review of appellees' denial of his request for permission to fill in Sand Pond.
Instead, appellant brought this suit in circuit court against appellees seeking declaratory relief under Chapter 86, Florida Statutes (1977). In count one of his complaint, appellant asserted that this Act is unconstitutional because (1) it constitutes an unlawful delegation of legislative power in failing to set forth adequate standards for enforcement and application of the provisions of the Act; (2) the provisions of the Act are so vague and uncertain that persons affected thereby cannot determine what acts relating to environmental resources are lawful and proper, thus violating the due process clauses of the federal and state constitutions; and (3) the provisions of the Act bear no reasonable relation to the protection and preservation of the public health, safety and welfare, nor to the providing and maintenance of standards which will ensure the purity of waters consistent with public health and public enjoyment thereof and, therefore, amount to a denial of equal protection of the law and a taking of property without due process of law contrary to provisions of the federal and Florida constitutions. Appellant requested the entry of a declaratory judgment pursuant to Chapter 86 declaring that the Act is unconstitutional and void and that appellant is not required to comply with the terms and provisions of the Act. Appellant also demanded that appellees be permanently restrained and enjoined from enforcing the provisions of the Act as against appellant.
In count two of his complaint, appellant alleged that the action of appellees in refusing appellant permission to fill in Sand Pond amounted to a taking of appellant's property without just compensation in violation of the Florida constitution, denied appellant equal protection of the law, and was unreasonable, arbitrary and capricious in that appellees applied standards to appellant different from those applied in similar circumstances to others seeking similar or identical relief. Appellant again requested a declaratory judgment that the Act is void and an injunction barring appellees from enforcing the provisions of the Act as against appellant.
Appellees filed a motion to dismiss, arguing that the circuit court lacked subject matter jurisdiction because appellant's complaint sought judicial review of appellees' action in denying appellant permission to fill in Sand Pond, and appellant's only avenue for judicial review of that action was by petition to this court pursuant to Section 120.68. The trial judge agreed and entered an order dismissing the complaint with prejudice.
On this appeal the parties have framed the issue as being whether the complaint in this case constituted a general attack on the validity of the Act, as appellant contends, or constituted a collateral attack on a particular administrative order, as appellees contend. As far as count one is concerned, we agree with appellant. That count asserts constitutional grounds for a *427 determination that the Act is invalid. Those constitutional issues could not have been considered by this court on petition for review of the action of appellees in denying appellant permission to fill in Sand Pond. They are not res judicata.
As far as count two is concerned, we agree with appellees. Count two asserts that the action of appellees in denying permission to appellant violated provisions of the Florida and federal constitutions. Section 120.68(12)(c) specifically provides that on judicial review of agency action by a district court of appeal, the court shall remand the case to the agency if it finds that the agency's exercise of discretion is in violation of a constitutional provision. Since count two asserts issues which could have been resolved by this court in reviewing the action of appellees in denying permission to appellant to fill in Sand Pond, those issues are foreclosed by the doctrine of res judicata.[6]
In De Groot v. Sheffield, 95 So.2d 912 (Fla. 1957), the Supreme Court of Florida announced the rule that where direct judicial review of administrative action is available to a party but not sought, the action may not be collaterally attacked by the party in a separate judicial proceeding. As pointed out in 2 Davis, Administrative Law Treatise, 612 (1958), whenever a court holds that an administrative determination is invulnerable to a collateral attack, the result may be phrased in terms of res judicata: the administrative determination is res judicata for purposes of the proceeding in which the collateral attack is made. Res judicata means that where a final judgment has been rendered by a court having jurisdiction of the subject matter and of the parties, it is binding on the parties and their privies, and is a bar to another suit or action between the same parties for the same subject matter. The bar extends to every question that was presented or might have been presented and determined in the first suit. Prall v. Prall, 58 Fla. 496, 50 So. 867 (1909).
Florida courts have consistently held that a party to administrative proceedings may not attack agency action taken in those proceedings by an action in circuit court on constitutional or other grounds, the only means of judicial review being by a petition to a district court of appeal under Section 120.68. Carrollwood State Bank v. Lewis, 362 So.2d 110 (Fla. 1st DCA 1978); Adams Packing Association v. Florida Department of Citrus, 352 So.2d 569 (Fla. 2d DCA 1977); School Board of Leon County v. Mitchell, 346 So.2d 562 (Fla. 1st DCA 1977); Rose v. Dade County, 332 So.2d 136 (Fla. 3d DCA 1976); Centex Homes Corporation v. Metropolitan Dade County, 318 So.2d 149 (Fla. 3d DCA 1975).
As noted above, in all these cases the matter was treated as a question of subject matter jurisdiction. It seems to us that what these cases have said is that when administrative agency action in a proceeding has become final as to a party, whether or not review by a district court of appeal is sought, that party is foreclosed from asserting in circuit court that the agency action is unconstitutional (or is improper for any other reason). This is for the simple reason that the unconstitutionality of the action is an issue which could have been asserted by the party on direct review by the district court of appeal pursuant to Section 120.68. That would be the case whether the particular agency action took the form of a rule, a regulation, an order, or any other form.
On the other hand, the constitutional validity of the law pursuant to which the administrative agency takes action, or the constitutional validity of some act of the agency taken in previous proceedings, in the form of a rule or regulation or some other form, are matters which the administrative *428 agency may not determine. Gulf Pines Memorial Park, Inc. v. Oaklawn Memorial Park, Inc., 361 So.2d 695 (Fla. 1978); Adams Packing Association v. Florida Department of Citrus, supra; Department of Revenue of Florida v. Young American Builders, 330 So.2d 864 (Fla. 1st DCA 1976); State Department of Administration v. State Department of Administration, 326 So.2d 187 (Fla. 1st DCA 1976). By the same token, Section 120.68 does not provide that the district court of appeal, on review of agency action, may overturn that action because of the unconstitutionality of the law pursuant to which the agency acts or because of the constitutional invalidity of any agency action other than the action before the court for review.
Accordingly, a party to administrative proceedings is not foreclosed by the doctrine of res judicata from asserting in circuit court that the law pursuant to which the agency acts is unconstitutional or that some action of the agency taken in previous proceedings is likewise unconstitutional. A careful examination of the constitutional issues asserted in the circuit court action is sometimes necessary, as in Bama Investors, Inc. v. Metropolitan Dade County, 349 So.2d 207 (Fla. 3d DCA 1977), cert. denied, 359 So.2d 1217 (Fla. 1978). The determination may be difficult for both trial judges and district courts of appeal when the case is in the posture of a ruling on a motion to dismiss for lack of subject matter jurisdiction. See, for example, the doubts expressed in Metropolitan Dade County v. Department of Commerce, 365 So.2d 432 (Fla. 3d DCA 1978).
As a general rule, in a case where a party to an administrative proceeding asserts constitutional issues in circuit court against the agency, we suggest that the point of analysis is to determine where the alleged constitutional violation occurred. If it is alleged to have occurred in the taking of action by the agency in the proceeding to which the plaintiff was a party, whether the violation be procedural[7] or substantive, and whether the action be a rule, regulation, order, or some other form, the issue is foreclosed from consideration in circuit court as grounds for relief. If the violation is not in the taking of action in the proceeding to which the plaintiff was a party, but in a statute or in some prior agency action such as a rule or regulation, that issue is not one which could have been asserted in the administrative proceeding or in the district court of appeal on review of the agency action, and thus may be asserted in circuit court as grounds for relief.
Not every rule is absolute, and we ourselves recognized an exception recently in Florida Canners Association v. State of Florida, Department of Citrus, 371 So.2d 503 (Fla. 2d DCA 1979). The final agency action in that case was the adoption of a rule. The rule was attacked by petition for review in this court on several grounds. In the first instance, it was asserted that the administrative agency did not have implied power to adopt the rule but if that power were so implied, the legislature had unlawfully delegated legislative power to the agency. It was further asserted that, if the court rejected these initial arguments, it should find that the rule violated the commerce clause of the United States Constitution and the guarantees of due process of law and freedom of speech contained in both the United States and Florida Constitutions.
The issue of unlawful delegation of legislative power, of course, related to the constitutional validity of the law pursuant to which the administrative agency purported to act. But resolution of that issue depended on identifying what provision of the law, if any, gave the administrative agency implied power to adopt the rule in the first instance (a matter clearly proper for this court to determine) and a ruling against the agency on either issue would have made it unnecessary for this court to consider the further constitutional issues. We simply saw no sensible way to segregate the issue of unlawful delegation of legislative power so that it could be separately considered by *429 a circuit court and then brought to this court by appeal. We, therefore, considered the resolution of the unlawful delegation issue as indispensable to the exercise of the judicial review to which the petitioners were clearly entitled under Section 120.68. We caution, however, that the Florida Canners case does not support the proposition that in the usual case, a constitutional issue concerning the validity of a law pursuant to which an administrative agency acts may be piggybacked to this court aboard a petition for judicial review of agency action under Section 120.68. The Florida Canners decision in this respect should be considered strictly limited to the particular situation presented in that case.
We hold that count one of appellant's complaint, asserting the constitutional invalidity of the Hillsborough County Environmental Protection Act, was not foreclosed from consideration by the circuit court by reason of appellant's failure to obtain a review by this court of appellees' action in denying appellant permission to fill in Sand Pond. We hold that count two of appellant's complaint, asserting that appellees' action violated appellant's constitutional rights, was barred by the res judicata effect of the action, for which no direct review was sought. The order dismissing the complaint with prejudice is reversed as far as count one is concerned, with instructions that count one be reinstated.
GRIMES, C.J., and HOBSON, J., concur.
NOTES
[1]  § 120.52(10), Florida Statutes (Supp. 1978), defines a party to an administrative proceeding as:

(10) "Party" means:
(a) Specifically named persons whose substantial interests are being determined in the proceeding.
(b) Any other person who, as a matter of constitutional right, provision of statute, or provision of agency regulation, is entitled to participate in whole or in part in the proceeding, or whose substantial interests will be affected by proposed agency action.
(c) Any other person, including an agency staff member, allowed by the agency to intervene or participate in the proceeding as a party. An agency may by rule authorize limited forms of participation in agency proceedings for persons who are not eligible to become parties.
(d) Any county representative, agency, department, or unit funded and authorized by state statute or county ordinance to represent the interests of the consumers of a county, when the proceeding involves the substantial interests of a significant number of residents of the county and the board of county commissioners has, by resolution, authorized the representative, agency, department, or unit to represent the class of interested persons. The authorizing resolution shall apply to a specific proceeding and to appeals and ancillary proceedings thereto, and it shall not be required to state the names of the persons whose interests are to be represented.
Prisoners as defined in s. 944.02(5) shall not be considered parties for the purposes of obtaining proceedings under s. 120.54(16) or s. 120.57.
[2]  § 120.68 provides that any party adversely affected by final agency action is entitled to judicial review which shall be by the district court of appeal except in matters for which judicial review by the supreme court is provided by law.
[3]  It would not be necessary, for example, to consider the effect in such cases of § 120.73, which provides that nothing in the Administrative Procedure Act shall be construed to divest the circuit courts of jurisdiction to render declaratory judgments under Chapter 86.
[4]  Where the plaintiff is a party to pending administrative proceedings before the agency in question but no final agency action has been taken, or where the plaintiff has failed to initiate proceedings before the agency for relief, the doctrines of primary jurisdiction and exhaustion of administrative remedies act as a limitation on the exercise of a circuit court's subject matter jurisdiction in such cases. School Board of Leon County v. Mitchell, 346 So.2d 562 (Fla. 1st DCA 1977). Application of those doctrines requires a similar determination of what constitutional issues may be asserted in an administrative proceeding and on review by a district court of appeal.
[5]  Ch. 67-1504, Laws of Florida (Special Acts) 1967, as amended.
[6]  Resolution of any of those issues involving questions of fact would have required, of course, a record containing evidence of the facts establishing the constitutional violation; for example, evidence to support the claim that standards were applied which differed from those applied to others in similar situations. § 120.57(1)(a)4 and 120.58(1)(b) provide a party ample opportunity and means to obtain and present evidence in an administrative proceeding pertinent to relevant constitutional issues.
[7]  Procedural errors are specific grounds for remand. § 120.68(8).
