Dashboard > WebWork > ... > FAQ > Why does FreeMarker complains that there's an error in my user-directive when I used JSP Tag
  WebWork Log In View a printable version of the current page.  
  Why does FreeMarker complains that there's an error in my user-directive when I used JSP Tag
Added by tm_jee, last edited by tm_jee on Nov 14, 2005
Labels: 
(None)

To use JSP Tags in FreeMarker template, the following needs to be included in the web.xml

<servlet>
    <servlet-name>jspSupportServlet</servlet-name>
    <servlet-class>com.opensymphony.webwork.views.JspSupportServlet.JspSupportServlet</servlet-class>
    <load-on-startup>10</load-on-startup>
</servlet>

The snippets above, register a JspSupportServlet with the webapp, and requires that the container load it upon startup. It provides access to the servlet instance itself where valuable information like ServletContext could be obtained. This is needed for FreeMarker template rendering that contains JSP tags.

Site powered by a free Open Source Project / Non-profit License (more) of Confluence - the Enterprise wiki.
Learn more or evaluate Confluence for your organisation.
Powered by Atlassian Confluence, the Enterprise Wiki. (Version: 2.2.9 Build:#527 Sep 07, 2006) - Bug/feature request - Contact Administrators