I have tested this as a standalone Freemarker result and it works

    <#assign itemValue = struts.getText('username') />
    <p>username = ${itemValue}</p>
    <p>username = ${struts.getText('username')}</p>