如何在freemarker中使用ajax theme
为什么我在.ftl文件中使用<@ww.head theme="ajax" debug="false"/>时就出错呢?请高手帮我看看到底是哪里的问题?
xwork.xml配置:
<action name="modTribeInput"
class="com.xwkj.blog.tribe.web.action.TribeInputAction" method="modTribeInput">
<result name="success" type="freemarker">/view/tribe/admin_tribe_1.htm</result>
<interceptor-ref name="defaultComponentStack"/>
</action>
视图文件admin_tribe_1.htm部分代码:
<#import "/view/util/MarcoUtil.html" as pageUtil>
<html>
<head>
<base href="<@pageUtil.base/>"/>
<@ww.head theme="ajax" debug="false"/><meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link href="../css/base.css" type="text/css" rel="stylesheet">
<link href="../css/main.css" type="text/css" rel="stylesheet">
<title>部落编辑</title>
.....
出错信息:
FreeMarker template error!
on line 5, column 1 in view/tribe/admin_tribe_1.htm ww.head not found.
The problematic instruction:
----------
==> user-directive ww.head [on line 5, column 1 in view/tribe/admin_tribe_1.htm]
----------
Java backtrace for programmers:
----------
freemarker.core.InvalidReferenceException: on line 5, column 1 in view/tribe/admin_tribe_1.htm ww.head not found.
at freemarker.core.UnifiedCall.accept(UnifiedCall.java:136)
at freemarker.core.Environment.visit(Environment.java:196)
at freemarker.core.MixedContent.accept(MixedContent.java:92)
at freemarker.core.Environment.visit(Environment.java:196)
at freemarker.core.Environment.process(Environment.java:176)
at freemarker.template.Template.process(Template.java:231)
at com.opensymphony.webwork.views.freemarker.FreemarkerResult.doExecute(FreemarkerResult.java:85)
at com.opensymphony.webwork.dispatcher.WebWorkResultSupport.execute(WebWorkResultSupport.java:101)
at com.opensymphony.xwork.DefaultActionInvocation.executeResult(DefaultActionInvocation.java:311)
at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:206)
at com.opensymphony.xwork.interceptor.DefaultWorkflowInterceptor.doIntercept(DefaultWorkflowInterceptor.java:168)
at com.opensymphony.xwork.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:86)
at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:188)
at com.opensymphony.xwork.validator.ValidationInterceptor.doIntercept(ValidationInterceptor.java:115)
at com.opensymphony.xwork.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:86)
at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:188)
at com.opensymphony.xwork.interceptor.AroundInterceptor.intercept(AroundInterceptor.java:31)
at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:188)
at com.opensymphony.xwork.interceptor.AroundInterceptor.intercept(AroundInterceptor.java:31)
at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:188)
at com.opensymphony.xwork.interceptor.AroundInterceptor.intercept(AroundInterceptor.java:31)
at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:188)
at com.opensymphony.webwork.interceptor.FileUploadInterceptor.intercept(FileUploadInterceptor.java:136)
at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:188)
at com.opensymphony.xwork.interceptor.AroundInterceptor.intercept(AroundInterceptor.java:31)
at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:188)
at com.opensymphony.xwork.interceptor.AroundInterceptor.intercept(AroundIntercepto