Apache Struts 2 Documentation > Home > FAQs > Why does FreeMarker complain that there's an error in my user-directive when I used JSP Tag |

Apache Struts 2 Documentation
Why does FreeMarker complain that there's an error in my user-directive when I used JSP Tag
Edit Page Browse Space Add Page Add News
Added by tm_jee, last edited by Musachy Barroso on Feb 03, 2007 (view change)

To use JSP Tags with our FreeMarker templates, the `jspSupportServlet` needs to be loaded through the `web.xml`.

web.xml

    <servlet>
        <servlet-name>jspSupportServlet</servlet-name>
        <servlet-class>org.apache.struts2.views.JspSupportServlet</servlet-class>
        <load-on-startup>10</load-on-startup>
    </servlet>

The servlet element registers the JspSupportServlet and loads it on startup. FreeMarker obtains the information it needs to render JSP tags from the servlet instance.