# <cfstatic>

defines a static constructor within components

This tag **must** have a body.
This tag is also supported within [<cfscript>](script.md)

**Introduced:** 5.0.0.0

```
<cfstatic><!--- body ---></cfstatic>
```

*This tag does not use any attributes.*

# Examples

```cfml
<cfcomponent>
    <!--- inside the static constructor you can define static variables, this code is executed when the "class" instance is loaded --->
    <cfstatic>
        <cfset susi=1> <!--- written to the static scope (defining the scope is not necessary) --->
        <cfset static.sorglos=2> <!--- again written to the static scope --->
    </cfstatic>
<cfcomponent>
```








# Categories

[Components (CFCs)](../../categories/component.md), [Static](../../categories/static.md)

# See Also

[<cfcomponent>](component.md)