index.ftl
<
#assign
c
=JspTaglibs["/WEB-INF/c.tld"]
>
<
#assign
fmt
=JspTaglibs["/WEB-INF/fmt.tld"]
>
<
#assign
x
=JspTaglibs["/WEB-INF/x.tld"]
>
<
#assign
sql
=JspTaglibs["/WEB-INF/sql.tld"]
>
<
html
>
<
head
>
<
title
>
FreeMarker Struts Example
</
title
>
<
meta
http-equiv
="Content-type"
content
="text/html; charset=utf-8"
>
</
head
>
<
body
>
<
@fmt
.setBundle basename
="rs"
var
="rs"
/>
<
@fmt
.message key
="test"
bundle
="${rs}"
/>
</
body
>
</
html
>
报错。。。。。。。
FreeMarker template error!java.lang.IllegalArgumentException: argument type mismatch
The problematic instruction:
----------
==> user-directive fmt.message [on line 12, column 3 in index.ftl]
----------
Java backtrace for programmers:
----------
freemarker.template.TemplateModelException: java.lang.IllegalArgumentException: argument type mismatch
at freemarker.ext.jsp.TagTransformModel.getWriter(TagTransformModel.java:177)
at freemarker.core.Environment.visit(Environment.java:220)
at freemarker.core.UnifiedCall.accept(UnifiedCall.java:116)
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:232)
at freemarker.ext.servlet.FreemarkerServlet.process(FreemarkerServlet.java:427)
at freemarker.ext.servlet.FreemarkerServlet.doGet(FreemarkerServlet.java:366)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:697)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
at org.jboss.web.tomcat.tc5.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:156)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
at java.lang.Thread.run(Thread.java:619)
Caused by: java.lang.IllegalArgumentException: argument type mismatch
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at freemarker.ext.jsp.TagTransformModel.setupTag(TagTransformModel.java:219)
at freemarker.ext.jsp.TagTransformModel.getWriter(TagTransformModel.java:148)
... 30 more
谁知道怎么回事?
posted on 2007-05-10 11:27
交口称赞 阅读(5846)
评论(5) 编辑 收藏 所属分类:
freemarker