# <cfstatic>

defines a static constructor within components

This tag requires a body/content and a closing tag.
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

```1
<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)