struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sylvain Gourio" <sylvain.gou...@gmail.com>
Subject tag included in antoher one
Date Tue, 21 Aug 2007 16:55:03 GMT
Hello,
I'm facing difficulties with freemarker tags, when I try to include one
inside the other.

the JSP :
<%@taglib prefix="s" uri="/struts-tags" %>
<%@taglib uri="/WEB-INF/tag_test.tld" prefix="test"  %>

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
    <title>Index</title>
    <s:head />
</head>
<body>
    <test:owner />
</body>
</html>

-------
and the owner.ftl:

owner
<#assign sub=JspTaglibs["/WEB-INF/tag_test.tld"] />
<@sub.child/>


--------

Both child and owner tags extends
org.apache.struts2.views.jsp.ui.AbstractUITag and have a component wich
extends org.apache.struts2.components.UIBean

When running I get the following error :

GRAVE: error when rendering

out != pageContext.getOut(). Out is
org.apache.jasper.runtime.JspWriterImpl@190d536 pageContext.getOut() is null
The problematic instruction:
----------
==> user-directive sub.child [on line 3, column 1 in
template/xhtml/ownerTag.ftl]
----------

Java backtrace for programmers:
----------
freemarker.template.TemplateModelException: out != pageContext.getOut(). Out
is org.apache.jasper.runtime.JspWriterImpl@190d536 pageContext.getOut() is
null
    at freemarker.ext.jsp.TagTransformModel.getWriter(TagTransformModel.java
:156)
    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
org.apache.struts2.components.template.FreemarkerTemplateEngine.renderTemplate
(FreemarkerTemplateEngine.java:148)
    at org.apache.struts2.components.UIBean.mergeTemplate(UIBean.java:530)
    at org.apache.struts2.components.UIBean.end(UIBean.java:484)
    at org.apache.struts2.views.jsp.ComponentTagSupport.doEndTag(
ComponentTagSupport.java:43)
    at org.apache.jsp.jsp.index_jsp._jspx_meth_test_005fowner_005f0
(index_jsp.java:129)
    at org.apache.jsp.jsp.index_jsp._jspService(index_jsp.java:80)
    at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:98)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
    at org.apache.jasper.servlet.JspServletWrapper.service(
JspServletWrapper.java:328)
    at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java
:315)
    at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(
ApplicationFilterChain.java:269)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(
ApplicationFilterChain.java:188)
    at org.apache.struts2.dispatcher.FilterDispatcher.doFilter(
FilterDispatcher.java:414)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(
ApplicationFilterChain.java:215)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(
ApplicationFilterChain.java:188)
    at com.opensymphony.module.sitemesh.filter.PageFilter.parsePage(
PageFilter.java:118)
    at com.opensymphony.module.sitemesh.filter.PageFilter.doFilter(
PageFilter.java:52)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(
ApplicationFilterChain.java:215)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(
ApplicationFilterChain.java:188)
    at org.apache.struts2.dispatcher.ActionContextCleanUp.doFilter(
ActionContextCleanUp.java:99)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(
ApplicationFilterChain.java:215)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(
ApplicationFilterChain.java:188)
    at org.apache.catalina.core.StandardWrapperValve.invoke(
StandardWrapperValve.java:210)
    at org.apache.catalina.core.StandardContextValve.invoke(
StandardContextValve.java:174)
    at org.apache.catalina.core.StandardHostValve.invoke(
StandardHostValve.java:127)
    at org.apache.catalina.valves.ErrorReportValve.invoke(
ErrorReportValve.java:117)
    at org.apache.catalina.core.StandardEngineValve.invoke(
StandardEngineValve.java:108)
    at org.apache.catalina.connector.CoyoteAdapter.service(
CoyoteAdapter.java:151)
    at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:200)
    at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:283)
    at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:773)
    at org.apache.jk.common.ChannelSocket.processConnection(
ChannelSocket.java:703)
    at org.apache.jk.common.ChannelSocket$SocketConnection.runIt(
ChannelSocket.java:895)
    at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(
ThreadPool.java:685)
    at java.lang.Thread.run(Thread.java:595)


Thanks !

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message