Re: How can I combine a result (tiles + xslt)?
On Wed, 2008-03-05 at 17:18 -0500, Griffith, Michael * wrote: [snip] > > > Is this a good application for writing my own interceptor for? You would want to write your own "Result Type" for this. Writing your own results is not as well documented as writing your own interceptors, but since you are combining the functionality of two built-in result types, it may be "pretty simple." Another possible choice would be to use the s:action tag with executeResult set to true... http://struts.apache.org/2.x/docs/action.html Then, have one action that uses a tiles result, but in that result, have the s:action call the action which will render the xslt result. -Wes
RE: How can I combine a result (tiles + xslt)?
Hi Wes, Thanks for the reply. The s:action tag seems to work. I have a tiles action that is the actual URL that the user would navigate to, and in the JSP fragment that is the body tile, I am using the s:action to invoke the XSLT action and return the HTML fragment for the body. Thanks so much for pointing this out, I was not aware of this tag. Cheers! MG -Original Message- From: Wes Wannemacher [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 05, 2008 4:49 PM To: Struts Users Mailing List Subject: Re: How can I combine a result (tiles + xslt)? On Wed, 2008-03-05 at 17:18 -0500, Griffith, Michael * wrote: [snip] > > > Is this a good application for writing my own interceptor for? You would want to write your own "Result Type" for this. Writing your own results is not as well documented as writing your own interceptors, but since you are combining the functionality of two built-in result types, it may be "pretty simple." Another possible choice would be to use the s:action tag with executeResult set to true... http://struts.apache.org/2.x/docs/action.html Then, have one action that uses a tiles result, but in that result, have the s:action call the action which will render the xslt result. -Wes - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How can I combine a result (tiles + xslt)?
Michael- remembering our academic coursework teaches Not(Not condition) evaluates positive be sure to set ignoreContextParams="false" as in I would encourage you to read Dave's article on using ResultTypes at http://struts.apache.org/2.x/docs/result-types.html MG - Original Message - From: "Griffith, Michael *" <[EMAIL PROTECTED]> To: "Struts Users Mailing List" Sent: Thursday, March 06, 2008 10:16 AM Subject: RE: How can I combine a result (tiles + xslt)? Hi Wes, Thanks for the reply. The s:action tag seems to work. I have a tiles action that is the actual URL that the user would navigate to, and in the JSP fragment that is the body tile, I am using the s:action to invoke the XSLT action and return the HTML fragment for the body. Thanks so much for pointing this out, I was not aware of this tag. Cheers! MG -Original Message- From: Wes Wannemacher [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 05, 2008 4:49 PM To: Struts Users Mailing List Subject: Re: How can I combine a result (tiles + xslt)? On Wed, 2008-03-05 at 17:18 -0500, Griffith, Michael * wrote: [snip] > > > Is this a good application for writing my own interceptor for? You would want to write your own "Result Type" for this. Writing your own results is not as well documented as writing your own interceptors, but since you are combining the functionality of two built-in result types, it may be "pretty simple." Another possible choice would be to use the s:action tag with executeResult set to true... http://struts.apache.org/2.x/docs/action.html Then, have one action that uses a tiles result, but in that result, have the s:action call the action which will render the xslt result. -Wes - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How can I combine a result (tiles + xslt)?
Wow the ability of S2 to do this is awesome and looks simple!!. On Thu, Mar 6, 2008 at 9:50 AM, Martin Gainty <[EMAIL PROTECTED]> wrote: > Michael- > > remembering our academic coursework teaches Not(Not condition) evaluates > positive > be sure to set ignoreContextParams="false" as in ignoreContextParams="false" ...> > > I would encourage you to read Dave's article on using ResultTypes at > http://struts.apache.org/2.x/docs/result-types.html > > MG > - Original Message - > From: "Griffith, Michael *" <[EMAIL PROTECTED]> > To: "Struts Users Mailing List" > Sent: Thursday, March 06, 2008 10:16 AM > Subject: RE: How can I combine a result (tiles + xslt)? > > > Hi Wes, > > Thanks for the reply. The s:action tag seems to work. I have a tiles > action that is the actual URL that the user would navigate to, and in > the JSP fragment that is the body tile, I am using the s:action to > invoke the XSLT action and return the HTML fragment for the body. > > Thanks so much for pointing this out, I was not aware of this tag. > > Cheers! > MG > > -Original Message----- > From: Wes Wannemacher [mailto:[EMAIL PROTECTED] > Sent: Wednesday, March 05, 2008 4:49 PM > To: Struts Users Mailing List > Subject: Re: How can I combine a result (tiles + xslt)? > > > On Wed, 2008-03-05 at 17:18 -0500, Griffith, Michael * wrote: > [snip] > > > > > > > Is this a good application for writing my own interceptor for? > > > You would want to write your own "Result Type" for this. Writing your > own results is not as well documented as writing your own interceptors, > but since you are combining the functionality of two built-in result > types, it may be "pretty simple." > > Another possible choice would be to use the s:action tag with > executeResult set to true... > http://struts.apache.org/2.x/docs/action.html > Then, have one action that uses a tiles result, but in that result, have > the s:action call the action which will render the xslt result. > > -Wes > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > >
RE: How can I combine a result (tiles + xslt)?
Hmmm... while this approach displays the page OK, I get the error below in my JBoss console when executing the action. Is this something I need to prevent with some sort of page directive? 2008-03-06 13:14:11,470 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost].[/DataCa ll].[jsp]] Servlet.service() for servlet jsp threw exception java.io.IOException: Stream closed at org.apache.jasper.runtime.JspWriterImpl.ensureOpen(JspWriterImpl.java:20 4) at org.apache.jasper.runtime.JspWriterImpl.flushBuffer(JspWriterImpl.java:1 15) at org.apache.jasper.runtime.PageContextImpl.release(PageContextImpl.java:1 86) at org.apache.jasper.runtime.JspFactoryImpl.internalReleasePageContext(JspF actoryImpl.java:117) at org.apache.jasper.runtime.JspFactoryImpl.releasePageContext(JspFactoryIm pl.java:76) at org.apache.jsp.fragments.root_jsp._jspService(root_jsp.java:106) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) at javax.servlet.http.HttpServlet.service(HttpServlet.java:803) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.ja va:373) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:336) 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(Applica tionFilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt erChain.java:206) at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatc her.java:654) at org.apache.catalina.core.ApplicationDispatcher.processRequest(Applicatio nDispatcher.java:445) at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDisp atcher.java:379) at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispat cher.java:292) at org.apache.tiles.servlet.context.ServletTilesRequestContext.forward(Serv letTilesRequestContext.java:198) at org.apache.tiles.servlet.context.ServletTilesRequestContext.dispatch(Ser vletTilesRequestContext.java:185) at org.apache.tiles.context.TilesRequestContextWrapper.dispatch(TilesReques tContextWrapper.java:72) at org.apache.struts2.tiles.StrutsTilesRequestContext.dispatch(StrutsTilesR equestContext.java:86) at org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.jav a:419) at org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.jav a:370) at org.apache.struts2.views.tiles.TilesResult.doExecute(TilesResult.java:10 4) at org.apache.struts2.dispatcher.StrutsResultSupport.execute(StrutsResultSu pport.java:178) at com.opensymphony.xwork2.DefaultActionInvocation.executeResult(DefaultAct ionInvocation.java:348) -Original Message- From: Martin Gainty [mailto:[EMAIL PROTECTED] Sent: Thursday, March 06, 2008 9:51 AM To: Griffith, Michael * Cc: Struts Users Mailing List Subject: Re: How can I combine a result (tiles + xslt)? Michael- remembering our academic coursework teaches Not(Not condition) evaluates positive be sure to set ignoreContextParams="false" as in I would encourage you to read Dave's article on using ResultTypes at http://struts.apache.org/2.x/docs/result-types.html MG - Original Message - From: "Griffith, Michael *" <[EMAIL PROTECTED]> To: "Struts Users Mailing List" Sent: Thursday, March 06, 2008 10:16 AM Subject: RE: How can I combine a result (tiles + xslt)? Hi Wes, Thanks for the reply. The s:action tag seems to work. I have a tiles action that is the actual URL that the user would navigate to, and in the JSP fragment that is the body tile, I am using the s:action to invoke the XSLT action and return the HTML fragment for the body. Thanks so much for pointing this out, I was not aware of this tag. Cheers! MG -Original Message- From: Wes Wannemacher [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 05, 2008 4:49 PM To: Struts Users Mailing List Subject: Re: How can I combine a result (tiles + xslt)? On Wed, 2008-03-05 at 17:18 -0500, Griffith, Michael * wrote: [snip] > > > Is this a good application for writing my own interceptor for? You would want to write your own "Result Type" for this. Writing your own results is not as well documented as writing your own interceptors, but since you are combining the functionality of two built-in result types, it may be "pretty simple." Another possible choice would be to use the s:action tag with executeResult set to true... http://struts.apache.org/2.x/docs/action.html Then, have one action that uses a tiles result, but in that result, have the s:action call the action which will render the xslt result. -Wes
RE: How can I combine a result (tiles + xslt)?
Could this be a defect? https://issues.apache.org/struts/browse/WW-1385 -Original Message- From: Griffith, Michael * [mailto:[EMAIL PROTECTED] Sent: Thursday, March 06, 2008 1:25 PM To: Martin Gainty Cc: Struts Users Mailing List Subject: RE: How can I combine a result (tiles + xslt)? Hmmm... while this approach displays the page OK, I get the error below in my JBoss console when executing the action. Is this something I need to prevent with some sort of page directive? 2008-03-06 13:14:11,470 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost].[/DataCa ll].[jsp]] Servlet.service() for servlet jsp threw exception java.io.IOException: Stream closed at org.apache.jasper.runtime.JspWriterImpl.ensureOpen(JspWriterImpl.java:20 4) at org.apache.jasper.runtime.JspWriterImpl.flushBuffer(JspWriterImpl.java:1 15) at org.apache.jasper.runtime.PageContextImpl.release(PageContextImpl.java:1 86) at org.apache.jasper.runtime.JspFactoryImpl.internalReleasePageContext(JspF actoryImpl.java:117) at org.apache.jasper.runtime.JspFactoryImpl.releasePageContext(JspFactoryIm pl.java:76) at org.apache.jsp.fragments.root_jsp._jspService(root_jsp.java:106) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) at javax.servlet.http.HttpServlet.service(HttpServlet.java:803) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.ja va:373) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:336) 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(Applica tionFilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt erChain.java:206) at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatc her.java:654) at org.apache.catalina.core.ApplicationDispatcher.processRequest(Applicatio nDispatcher.java:445) at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDisp atcher.java:379) at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispat cher.java:292) at org.apache.tiles.servlet.context.ServletTilesRequestContext.forward(Serv letTilesRequestContext.java:198) at org.apache.tiles.servlet.context.ServletTilesRequestContext.dispatch(Ser vletTilesRequestContext.java:185) at org.apache.tiles.context.TilesRequestContextWrapper.dispatch(TilesReques tContextWrapper.java:72) at org.apache.struts2.tiles.StrutsTilesRequestContext.dispatch(StrutsTilesR equestContext.java:86) at org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.jav a:419) at org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.jav a:370) at org.apache.struts2.views.tiles.TilesResult.doExecute(TilesResult.java:10 4) at org.apache.struts2.dispatcher.StrutsResultSupport.execute(StrutsResultSu pport.java:178) at com.opensymphony.xwork2.DefaultActionInvocation.executeResult(DefaultAct ionInvocation.java:348) -Original Message- From: Martin Gainty [mailto:[EMAIL PROTECTED] Sent: Thursday, March 06, 2008 9:51 AM To: Griffith, Michael * Cc: Struts Users Mailing List Subject: Re: How can I combine a result (tiles + xslt)? Michael- remembering our academic coursework teaches Not(Not condition) evaluates positive be sure to set ignoreContextParams="false" as in I would encourage you to read Dave's article on using ResultTypes at http://struts.apache.org/2.x/docs/result-types.html MG - Original Message - From: "Griffith, Michael *" <[EMAIL PROTECTED]> To: "Struts Users Mailing List" Sent: Thursday, March 06, 2008 10:16 AM Subject: RE: How can I combine a result (tiles + xslt)? Hi Wes, Thanks for the reply. The s:action tag seems to work. I have a tiles action that is the actual URL that the user would navigate to, and in the JSP fragment that is the body tile, I am using the s:action to invoke the XSLT action and return the HTML fragment for the body. Thanks so much for pointing this out, I was not aware of this tag. Cheers! MG -Original Message- From: Wes Wannemacher [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 05, 2008 4:49 PM To: Struts Users Mailing List Subject: Re: How can I combine a result (tiles + xslt)? On Wed, 2008-03-05 at 17:18 -0500, Griffith, Michael * wrote: [snip] > > > Is this a good application for writing my own interceptor for? You would want to write your own "Result Type" for this. Writing your own results is not as well documented as writing your own interceptors, but since you are combining the functionality of two built-in result types, it may be "pretty simple." Another possible choice w
RE: How can I combine a result (tiles + xslt)?
Hi all, I've specified on both the struts tag, and the tiles include flush="false" ... template ... .. tile ... Same result. Does anyone have any other ideas on what I can do to prevent this? Any tile that is supposed to be rendered after the body (ie the footer) is not rendered because the stream is closed. Any help would be much appreciated... MG -Original Message- From: Griffith, Michael * [mailto:[EMAIL PROTECTED] Sent: Thursday, March 06, 2008 1:52 PM To: Struts Users Mailing List Subject: RE: How can I combine a result (tiles + xslt)? Could this be a defect? https://issues.apache.org/struts/browse/WW-1385 -Original Message- From: Griffith, Michael * [mailto:[EMAIL PROTECTED] Sent: Thursday, March 06, 2008 1:25 PM To: Martin Gainty Cc: Struts Users Mailing List Subject: RE: How can I combine a result (tiles + xslt)? Hmmm... while this approach displays the page OK, I get the error below in my JBoss console when executing the action. Is this something I need to prevent with some sort of page directive? 2008-03-06 13:14:11,470 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost].[/DataCa ll].[jsp]] Servlet.service() for servlet jsp threw exception java.io.IOException: Stream closed at org.apache.jasper.runtime.JspWriterImpl.ensureOpen(JspWriterImpl.java:20 4) at org.apache.jasper.runtime.JspWriterImpl.flushBuffer(JspWriterImpl.java:1 15) at org.apache.jasper.runtime.PageContextImpl.release(PageContextImpl.java:1 86) at org.apache.jasper.runtime.JspFactoryImpl.internalReleasePageContext(JspF actoryImpl.java:117) at org.apache.jasper.runtime.JspFactoryImpl.releasePageContext(JspFactoryIm pl.java:76) at org.apache.jsp.fragments.root_jsp._jspService(root_jsp.java:106) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) at javax.servlet.http.HttpServlet.service(HttpServlet.java:803) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.ja va:373) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:336) 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(Applica tionFilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt erChain.java:206) at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatc her.java:654) at org.apache.catalina.core.ApplicationDispatcher.processRequest(Applicatio nDispatcher.java:445) at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDisp atcher.java:379) at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispat cher.java:292) at org.apache.tiles.servlet.context.ServletTilesRequestContext.forward(Serv letTilesRequestContext.java:198) at org.apache.tiles.servlet.context.ServletTilesRequestContext.dispatch(Ser vletTilesRequestContext.java:185) at org.apache.tiles.context.TilesRequestContextWrapper.dispatch(TilesReques tContextWrapper.java:72) at org.apache.struts2.tiles.StrutsTilesRequestContext.dispatch(StrutsTilesR equestContext.java:86) at org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.jav a:419) at org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.jav a:370) at org.apache.struts2.views.tiles.TilesResult.doExecute(TilesResult.java:10 4) at org.apache.struts2.dispatcher.StrutsResultSupport.execute(StrutsResultSu pport.java:178) at com.opensymphony.xwork2.DefaultActionInvocation.executeResult(DefaultAct ionInvocation.java:348) -Original Message- From: Martin Gainty [mailto:[EMAIL PROTECTED] Sent: Thursday, March 06, 2008 9:51 AM To: Griffith, Michael * Cc: Struts Users Mailing List Subject: Re: How can I combine a result (tiles + xslt)? Michael- remembering our academic coursework teaches Not(Not condition) evaluates positive be sure to set ignoreContextParams="false" as in I would encourage you to read Dave's article on using ResultTypes at http://struts.apache.org/2.x/docs/result-types.html MG - Original Message - From: "Griffith, Michael *" <[EMAIL PROTECTED]> To: "Struts Users Mailing List" Sent: Thursday, March 06, 2008 10:16 AM Subject: RE: How can I combine a result (tiles + xslt)? Hi Wes, Thanks for the reply. The s:action tag seems to work. I have a tiles action that is the actual URL that the user would navigate to, and in the JSP fragment that is the body tile, I am using the s:action to invoke the XSLT action and return the HTML fragment for the body. Thanks so much for pointing this out, I was not aware of this tag. Cheers! MG -Original Message- From: Wes Wannemacher [mailto:[EMA
Re: How can I combine a result (tiles + xslt)?
2008/3/6, Griffith, Michael * <[EMAIL PROTECTED]>: > > Same result. Does anyone have any other ideas on what I can do to > prevent this? Any tile that is supposed to be rendered after the body > (ie the footer) is not rendered because the stream is closed. Version of Struts 2 and Tiles? Antonio
Re: How can I combine a result (tiles + xslt)?
Good Morning Michael This is a bug.. do you want to update JIRA? Thanks Martin- - Original Message - From: "Griffith, Michael *" <[EMAIL PROTECTED]> To: "Struts Users Mailing List" Sent: Thursday, March 06, 2008 4:07 PM Subject: RE: How can I combine a result (tiles + xslt)? Hi all, I've specified on both the struts tag, and the tiles include flush="false" .. template ... . tile ... Same result. Does anyone have any other ideas on what I can do to prevent this? Any tile that is supposed to be rendered after the body (ie the footer) is not rendered because the stream is closed. Any help would be much appreciated... MG -Original Message- From: Griffith, Michael * [mailto:[EMAIL PROTECTED] Sent: Thursday, March 06, 2008 1:52 PM To: Struts Users Mailing List Subject: RE: How can I combine a result (tiles + xslt)? Could this be a defect? https://issues.apache.org/struts/browse/WW-1385 -Original Message- From: Griffith, Michael * [mailto:[EMAIL PROTECTED] Sent: Thursday, March 06, 2008 1:25 PM To: Martin Gainty Cc: Struts Users Mailing List Subject: RE: How can I combine a result (tiles + xslt)? Hmmm... while this approach displays the page OK, I get the error below in my JBoss console when executing the action. Is this something I need to prevent with some sort of page directive? 2008-03-06 13:14:11,470 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost].[/DataCa ll].[jsp]] Servlet.service() for servlet jsp threw exception java.io.IOException: Stream closed at org.apache.jasper.runtime.JspWriterImpl.ensureOpen(JspWriterImpl.java:20 4) at org.apache.jasper.runtime.JspWriterImpl.flushBuffer(JspWriterImpl.java:1 15) at org.apache.jasper.runtime.PageContextImpl.release(PageContextImpl.java:1 86) at org.apache.jasper.runtime.JspFactoryImpl.internalReleasePageContext(JspF actoryImpl.java:117) at org.apache.jasper.runtime.JspFactoryImpl.releasePageContext(JspFactoryIm pl.java:76) at org.apache.jsp.fragments.root_jsp._jspService(root_jsp.java:106) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) at javax.servlet.http.HttpServlet.service(HttpServlet.java:803) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.ja va:373) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:336) 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(Applica tionFilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt erChain.java:206) at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatc her.java:654) at org.apache.catalina.core.ApplicationDispatcher.processRequest(Applicatio nDispatcher.java:445) at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDisp atcher.java:379) at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispat cher.java:292) at org.apache.tiles.servlet.context.ServletTilesRequestContext.forward(Serv letTilesRequestContext.java:198) at org.apache.tiles.servlet.context.ServletTilesRequestContext.dispatch(Ser vletTilesRequestContext.java:185) at org.apache.tiles.context.TilesRequestContextWrapper.dispatch(TilesReques tContextWrapper.java:72) at org.apache.struts2.tiles.StrutsTilesRequestContext.dispatch(StrutsTilesR equestContext.java:86) at org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.jav a:419) at org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.jav a:370) at org.apache.struts2.views.tiles.TilesResult.doExecute(TilesResult.java:10 4) at org.apache.struts2.dispatcher.StrutsResultSupport.execute(StrutsResultSu pport.java:178) at com.opensymphony.xwork2.DefaultActionInvocation.executeResult(DefaultAct ionInvocation.java:348) -Original Message- From: Martin Gainty [mailto:[EMAIL PROTECTED] Sent: Thursday, March 06, 2008 9:51 AM To: Griffith, Michael * Cc: Struts Users Mailing List Subject: Re: How can I combine a result (tiles + xslt)? Michael- remembering our academic coursework teaches Not(Not condition) evaluates positive be sure to set ignoreContextParams="false" as in I would encourage you to read Dave's article on using ResultTypes at http://struts.apache.org/2.x/docs/result-types.html MG - Original Message - From: "Griffith, Michael *" <[EMAIL PROTECTED]> To: "Struts Users Mailing List" Sent: Thursday, March 06, 2008 10:16 AM Subject: RE: How can I combine a result (tiles + xslt)? Hi Wes, Thanks for the reply. The s:action tag seems to work. I have a tiles action that is the actual URL th
RE: How can I combine a result (tiles + xslt)?
Struts 2.0.11.1 Tiles 2.0.5 -Original Message- From: Antonio Petrelli [mailto:[EMAIL PROTECTED] Sent: Friday, March 07, 2008 2:20 AM To: Struts Users Mailing List Subject: Re: How can I combine a result (tiles + xslt)? 2008/3/6, Griffith, Michael * <[EMAIL PROTECTED]>: > > Same result. Does anyone have any other ideas on what I can do to > prevent this? Any tile that is supposed to be rendered after the body > (ie the footer) is not rendered because the stream is closed. Version of Struts 2 and Tiles? Antonio - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: How can I combine a result (tiles + xslt)?
I'd be happy to do more than that; I'll fix the bug if someone can give me some design direction. MG -Original Message- From: Martin Gainty [mailto:[EMAIL PROTECTED] Sent: Friday, March 07, 2008 7:36 AM To: Griffith, Michael * Cc: Struts Users Mailing List Subject: Re: How can I combine a result (tiles + xslt)? Good Morning Michael This is a bug.. do you want to update JIRA? Thanks Martin- - Original Message - From: "Griffith, Michael *" <[EMAIL PROTECTED]> To: "Struts Users Mailing List" Sent: Thursday, March 06, 2008 4:07 PM Subject: RE: How can I combine a result (tiles + xslt)? Hi all, I've specified on both the struts tag, and the tiles include flush="false" .. template ... . tile ... Same result. Does anyone have any other ideas on what I can do to prevent this? Any tile that is supposed to be rendered after the body (ie the footer) is not rendered because the stream is closed. Any help would be much appreciated... MG -Original Message- From: Griffith, Michael * [mailto:[EMAIL PROTECTED] Sent: Thursday, March 06, 2008 1:52 PM To: Struts Users Mailing List Subject: RE: How can I combine a result (tiles + xslt)? Could this be a defect? https://issues.apache.org/struts/browse/WW-1385 -Original Message- From: Griffith, Michael * [mailto:[EMAIL PROTECTED] Sent: Thursday, March 06, 2008 1:25 PM To: Martin Gainty Cc: Struts Users Mailing List Subject: RE: How can I combine a result (tiles + xslt)? Hmmm... while this approach displays the page OK, I get the error below in my JBoss console when executing the action. Is this something I need to prevent with some sort of page directive? 2008-03-06 13:14:11,470 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost].[/DataCa ll].[jsp]] Servlet.service() for servlet jsp threw exception java.io.IOException: Stream closed at org.apache.jasper.runtime.JspWriterImpl.ensureOpen(JspWriterImpl.java:20 4) at org.apache.jasper.runtime.JspWriterImpl.flushBuffer(JspWriterImpl.java:1 15) at org.apache.jasper.runtime.PageContextImpl.release(PageContextImpl.java:1 86) at org.apache.jasper.runtime.JspFactoryImpl.internalReleasePageContext(JspF actoryImpl.java:117) at org.apache.jasper.runtime.JspFactoryImpl.releasePageContext(JspFactoryIm pl.java:76) at org.apache.jsp.fragments.root_jsp._jspService(root_jsp.java:106) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) at javax.servlet.http.HttpServlet.service(HttpServlet.java:803) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.ja va:373) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:336) 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(Applica tionFilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt erChain.java:206) at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatc her.java:654) at org.apache.catalina.core.ApplicationDispatcher.processRequest(Applicatio nDispatcher.java:445) at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDisp atcher.java:379) at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispat cher.java:292) at org.apache.tiles.servlet.context.ServletTilesRequestContext.forward(Serv letTilesRequestContext.java:198) at org.apache.tiles.servlet.context.ServletTilesRequestContext.dispatch(Ser vletTilesRequestContext.java:185) at org.apache.tiles.context.TilesRequestContextWrapper.dispatch(TilesReques tContextWrapper.java:72) at org.apache.struts2.tiles.StrutsTilesRequestContext.dispatch(StrutsTilesR equestContext.java:86) at org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.jav a:419) at org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.jav a:370) at org.apache.struts2.views.tiles.TilesResult.doExecute(TilesResult.java:10 4) at org.apache.struts2.dispatcher.StrutsResultSupport.execute(StrutsResultSu pport.java:178) at com.opensymphony.xwork2.DefaultActionInvocation.executeResult(DefaultAct ionInvocation.java:348) -Original Message- From: Martin Gainty [mailto:[EMAIL PROTECTED] Sent: Thursday, March 06, 2008 9:51 AM To: Griffith, Michael * Cc: Struts Users Mailing List Subject: Re: How can I combine a result (tiles + xslt)? Michael- remembering our academic coursework teaches Not(Not condition) evaluates positive be sure to set ignoreContextParams="false" as in I would encourage you to read Dave's article on using ResultTypes at http://struts.apache.org/2.x/docs/result-types.html MG - Or
Re: How can I combine a result (tiles + xslt)?
2008/3/7, Griffith, Michael * <[EMAIL PROTECTED]>: > > Struts 2.0.11.1 > Tiles 2.0.5 I think that this is a bug with Tiles 2.0.5: https://issues.apache.org/struts/browse/TILES-232 It is fixed, so if you build Tiles 2.0.6-SNAPSHOT by yourself it should go away. For further questions on Tiles please ask the Tiles Users mailing list: http://tiles.apache.org/mail.html (Notice that your particular question is OK to stay here in Struts, since it was a problem with Struts+Tiles). Antonio
Re: How can I combine a result (tiles + xslt)?
Good Afternoon Michael I just ran thru the scenario you described on a 'healthy' jsp page and see this debug output: 03-07 12:58:52,718 DEBUG (org.apache.struts2.interceptor.validation.AnnotationValidationInterceptor:1 34) - Validating /tags/non-ui/actionTag/form with method execute. 2000-03-07 12:58:52,734 DEBUG (org.apache.struts2.dispatcher.ServletDispatcherResult:113) - Forwarding to location /tags/non-ui/iteratorTag/done.jsp [GC [DefNew: 3968K->0K(4032K), 0.0108816 secs] 49623K->47040K(68568K), 0.0109704 secs] [GC [DefNew: 3968K->0K(4032K), 0.0168407 secs] 51008K->48964K(68568K), 0.0169301 secs] 2000-03-07 12:58:52,906 DEBUG (org.apache.struts2.components.UIBean:526) - Rendering template /template/xhtml/a 2000-03-07 12:58:52,921 DEBUG (org.apache.struts2.components.template.FreemarkerTemplateEngine:135) - Rendering template /template/simple/a.ftl [GC [DefNew: 3968K->0K(4032K), 0.0051196 secs] 52932K->49117K(68568K), 0.0052029 secs] 2000-03-07 12:58:52,937 DEBUG (org.apache.struts2.components.UIBean:526) - Rendering template /template/xhtml/a-close 2000-03-07 12:58:52,953 DEBUG (org.apache.struts2.components.template.FreemarkerTemplateEngine:135) - Rendering template /template/simple/a-close.ftl 2000-03-07 12:58:52,953 DEBUG (org.apache.struts2.dispatcher.ActionContextCleanUp:122) - skipping cleanup counter=1 [GC [DefNew: 3966K->0K(4032K), 0.0038605 secs] 53083K->49280K(68568K), 0.0039430 secs] [GC [DefNew: 3968K->0K(4032K), 0.0232088 secs] 53248K->52251K(68568K), 0.0232965 secs] [GC [1 CMS-initial-mark: 52251K(64536K)] 52251K(68568K), 0.0012270 secs] [CMS-concurrent-mark: 0.361/0.361 secs] to repeat the scenario- deploy struts2-showcase-2.0.11 to TC (its a monster so this will take a while..) vi /tags/non-ui/actionTag/showActionTagDemo.jsp add these lines to showActionTagDemo.jsp add these configuration lines to /WEB-INF/classes/struts-tags-non-ui.xml to configure in a 'healthy' action class and a result /tags/non-ui/iteratorTag/done.jsp insert the following jsp to /tags/non-ui/iteratorTag/date.jsp <[EMAIL PROTECTED] prefix="s" uri="/struts-tags" %> This is done.jsp This is done.jsp in a scratch folder create the necessary ActionTagDemo folder use the following build.xml for building with ant compile then edit in the following Action java file /tmjee/testing/ActionTagAction.java package tmjee.testing; import com.opensymphony.xwork2.ActionSupport; import org.apache.struts2.ServletActionContext; import java.lang.*; public class ActionTagAction extends ActionSupport { public String execute() throws Exception { return "done"; } public String doDefault() throws Exception { ServletActionContext.getRequest().setAttribute("stringByAction", "This is a String put in by the action's doDefault()"); return "done"; } } ant compile copy the compiled classes to Tomcat struts2-showcase-2.0.11 copy /tmjee/testing*.class $TOMCAT_HOME/webapps/struts2-showcase-2.0.11/WEB-INF/classes/tmjee/testing go to TC Manager reload the web application so TC container will re-read the configuration for struts2-showcase-2.0.11 http://localhost:8080/manager/html/reload?path=/struts2-showcase-2.0.11 now reference the affected jsp http://localhost:8080/struts2-showcase-2.0.11/tags/non-ui/actionTag/showActi onTagDemo.action please verify that you see This is done.jsp at the bottom of page Caveat: This is a base test to see if to determine if tiles:insertAttribute and s:action work without closing the socket streams.. I did'nt test out different freemarker templates or combinations If possible could you provide any or details for The action class you are implementing The full jsp you are using for view *Any/all* freemarker templates (*.ftl) you are implementing configuration files (web.xml,struts.xml,struts-validation.xml,struts-tags-non-ui.xml...) Thanks Martin- - Original Message - From: "Griffith, Michael *" <[EMAIL PROTECTED]> To: "Struts Users Mailing List" Sent: Thursday, March 06, 2008 4:07 PM Subject: RE: How can I combine a result (tiles + xslt)? Hi all, I've specified on both the struts tag, and the tiles include flush="false" .. template ... . tile ... Same result. Does anyone have any other ideas on what I can do to prevent this? Any tile that is supposed to be rendered after the body (ie the footer) is not rendered because the stream is closed. Any help would be much appreciated... MG -----Original Message- From: Griffith, Michael * [mailto:[EMAIL PROTECTED] Sent: Thursday, March 06, 2008 1:52 PM To: Struts Users Mailing List Subj
Re: How can I combine a result (tiles + xslt)?
Did you see Antonio's post about how it's probably a bug in Tiles?! Seems like it would be quite a bit easier to try his idea than all this. --- Martin Gainty <[EMAIL PROTECTED]> wrote: > Good Afternoon Michael > > I just ran thru the scenario you described on a 'healthy' jsp page and see > this debug output: > 03-07 12:58:52,718 DEBUG > (org.apache.struts2.interceptor.validation.AnnotationValidationInterceptor:1 > 34) - Validating /tags/non-ui/actionTag/form with method execute. > 2000-03-07 12:58:52,734 DEBUG > (org.apache.struts2.dispatcher.ServletDispatcherResult:113) - Forwarding to > location /tags/non-ui/iteratorTag/done.jsp > [GC [DefNew: 3968K->0K(4032K), 0.0108816 secs] 49623K->47040K(68568K), > 0.0109704 secs] > [GC [DefNew: 3968K->0K(4032K), 0.0168407 secs] 51008K->48964K(68568K), > 0.0169301 secs] > 2000-03-07 12:58:52,906 DEBUG (org.apache.struts2.components.UIBean:526) - > Rendering template /template/xhtml/a > 2000-03-07 12:58:52,921 DEBUG > (org.apache.struts2.components.template.FreemarkerTemplateEngine:135) - > Rendering template /template/simple/a.ftl > [GC [DefNew: 3968K->0K(4032K), 0.0051196 secs] 52932K->49117K(68568K), > 0.0052029 secs] > 2000-03-07 12:58:52,937 DEBUG (org.apache.struts2.components.UIBean:526) - > Rendering template /template/xhtml/a-close > 2000-03-07 12:58:52,953 DEBUG > (org.apache.struts2.components.template.FreemarkerTemplateEngine:135) - > Rendering template /template/simple/a-close.ftl > 2000-03-07 12:58:52,953 DEBUG > (org.apache.struts2.dispatcher.ActionContextCleanUp:122) - skipping cleanup > counter=1 > [GC [DefNew: 3966K->0K(4032K), 0.0038605 secs] 53083K->49280K(68568K), > 0.0039430 secs] > [GC [DefNew: 3968K->0K(4032K), 0.0232088 secs] 53248K->52251K(68568K), > 0.0232965 secs] > [GC [1 CMS-initial-mark: 52251K(64536K)] 52251K(68568K), 0.0012270 secs] > [CMS-concurrent-mark: 0.361/0.361 secs] > > to repeat the scenario- > deploy struts2-showcase-2.0.11 to TC (its a monster so this will take a > while..) > vi /tags/non-ui/actionTag/showActionTagDemo.jsp > add these lines to showActionTagDemo.jsp > > > > > ignoreContextParams="true"/> > > > > add these configuration lines to /WEB-INF/classes/struts-tags-non-ui.xml to > configure in a 'healthy' action class and a result > > /tags/non-ui/iteratorTag/done.jsp > > > insert the following jsp to /tags/non-ui/iteratorTag/date.jsp > <[EMAIL PROTECTED] prefix="s" uri="/struts-tags" %> > > > This is done.jsp > > > This is done.jsp > > > > in a scratch folder create the necessary ActionTagDemo folder > use the following build.xml for building with > ant compile > > > > > > > > > > > > > > > > > > location="/struts/struts-2.0.11/lib/struts2-core-2.0.11.jar"/> > > > > > > > location=":/SPRING/spring-framework-2.0.6/target/mock-classes"/> > > > > > > > > > > location="/SPRING/SPRING~1.5/SPRING~1.5-W/SPRING~1.5/dist/spring.jar"/> > > > > > > > > > depends="dist" > description="default: build everything" > /> > > > > > > > depends="compile" > description="create distributables (jars etc)"> > > > > > > > > destdir="classes" >classpathref="compile.classpath" >debug="on" >deprecation="on"/> > > > > then edit in the following Action java file > /tmjee/testing/ActionTagAction.java > > package tmjee.testing; > import com.opensymphony.xwork2.ActionSupport; > import org.apache.struts2.ServletActionContext; > import java.lang.*; > public class ActionTagAction extends ActionSupport > { > public String execute() throws Exception { > return "done"; > } > public String doDefault() throws Exception { > ServletActionContext.getRequest().setAttribute("stringByAction", "This > is a String put in by the action's doDefault()"); > return "done"; > } > } > > ant compile > copy the compiled classes to Tomcat struts2-showcase-2.0.11 > copy /tmjee/testing*.class > $TOMCAT_HOME/webapps/struts2-showcase-2.0.11/WEB-INF/classes/tmjee/testing > > go to TC Manager > reload the web application so TC container will re-read the configuration > for struts2-showcase-2.0.11 > http://localhost:8080/manager/html/reload?path=/struts2-showcase-2.0.11 > > now reference the affected jsp > http://localhost:8080/struts2-showcase-2.0.11/tags/non-ui/actionTag/showActi > onTagDemo.action > > please verify that you see > > This is done.jsp > > at the bottom of page > > Caveat: This is a base test to see if > > ignoreContextParams="true"/> > to determine if tiles:insertAttribute and s:action work without closing the > socket streams.. > > I did'nt test out different freemarker templates or combinations > If possible could you provide any or details for > The action class you are
RE: How can I combine a result (tiles + xslt)?
Dave, I did. I will try both, easy path first. I'll let you know what I find so that you can close the JIRA incident I opened. I did look at the JIRA ticket Antonio posted, and it seems likely that is the problem. Thanks to all that replied, especially all the extra effort that Martin went to. Cheers! MG -Original Message- From: Dave Newton [mailto:[EMAIL PROTECTED] Sent: Friday, March 07, 2008 12:45 PM To: Struts Users Mailing List Subject: Re: How can I combine a result (tiles + xslt)? Did you see Antonio's post about how it's probably a bug in Tiles?! Seems like it would be quite a bit easier to try his idea than all this. --- Martin Gainty <[EMAIL PROTECTED]> wrote: > Good Afternoon Michael > > I just ran thru the scenario you described on a 'healthy' jsp page and see > this debug output: > 03-07 12:58:52,718 DEBUG > (org.apache.struts2.interceptor.validation.AnnotationValidationIntercept or:1 > 34) - Validating /tags/non-ui/actionTag/form with method execute. > 2000-03-07 12:58:52,734 DEBUG > (org.apache.struts2.dispatcher.ServletDispatcherResult:113) - Forwarding to > location /tags/non-ui/iteratorTag/done.jsp > [GC [DefNew: 3968K->0K(4032K), 0.0108816 secs] 49623K->47040K(68568K), > 0.0109704 secs] > [GC [DefNew: 3968K->0K(4032K), 0.0168407 secs] 51008K->48964K(68568K), > 0.0169301 secs] > 2000-03-07 12:58:52,906 DEBUG (org.apache.struts2.components.UIBean:526) - > Rendering template /template/xhtml/a > 2000-03-07 12:58:52,921 DEBUG > (org.apache.struts2.components.template.FreemarkerTemplateEngine:135) - > Rendering template /template/simple/a.ftl > [GC [DefNew: 3968K->0K(4032K), 0.0051196 secs] 52932K->49117K(68568K), > 0.0052029 secs] > 2000-03-07 12:58:52,937 DEBUG (org.apache.struts2.components.UIBean:526) - > Rendering template /template/xhtml/a-close > 2000-03-07 12:58:52,953 DEBUG > (org.apache.struts2.components.template.FreemarkerTemplateEngine:135) - > Rendering template /template/simple/a-close.ftl > 2000-03-07 12:58:52,953 DEBUG > (org.apache.struts2.dispatcher.ActionContextCleanUp:122) - skipping cleanup > counter=1 > [GC [DefNew: 3966K->0K(4032K), 0.0038605 secs] 53083K->49280K(68568K), > 0.0039430 secs] > [GC [DefNew: 3968K->0K(4032K), 0.0232088 secs] 53248K->52251K(68568K), > 0.0232965 secs] > [GC [1 CMS-initial-mark: 52251K(64536K)] 52251K(68568K), 0.0012270 secs] > [CMS-concurrent-mark: 0.361/0.361 secs] > > to repeat the scenario- > deploy struts2-showcase-2.0.11 to TC (its a monster so this will take a > while..) > vi /tags/non-ui/actionTag/showActionTagDemo.jsp > add these lines to showActionTagDemo.jsp > > > > > ignoreContextParams="true"/> > > > > add these configuration lines to /WEB-INF/classes/struts-tags-non-ui.xml to > configure in a 'healthy' action class and a result > > /tags/non-ui/iteratorTag/done.jsp > > > insert the following jsp to /tags/non-ui/iteratorTag/date.jsp > <[EMAIL PROTECTED] prefix="s" uri="/struts-tags" %> > > > This is done.jsp > > > This is done.jsp > > > > in a scratch folder create the necessary ActionTagDemo folder > use the following build.xml for building with > ant compile > > > > > > > > > > > > > > > > > > location="/struts/struts-2.0.11/lib/struts2-core-2.0.11.jar"/> > > > > > > > location=":/SPRING/spring-framework-2.0.6/target/mock-classes"/> > > > > > > > > > > location="/SPRING/SPRING~1.5/SPRING~1.5-W/SPRING~1.5/dist/spring.jar"/> > > > > > > > > > depends="dist" > description="default: build everything" > /> > > > > > > > depends="compile" > description="create distributables (jars etc)"> > > > > > > > > destdir="classes" >classpathref="compile.classpath" >debug="on" >deprecation="on"/> > > > > then edit in the following Action java file > /tmjee/testing/ActionTagAction.java > > package tmjee.testing; > import com.opensymphony.xwork2.ActionSupport; > import org.apache.struts2.ServletActionContext; > import java.lang.*; > public class ActionTagAction extends ActionSupport > { > public Str
RE: How can I combine a result (tiles + xslt)?
Hi all, I checked out the current branch from the Tiles SVN repository: http://svn.apache.org/repos/asf/tiles/framework/trunk/ and built it. Version is 2.1.0-SNAPSHOT. This appears to be incompatible with the Struts2Tiles plugin? Has anyone run into this? The error is: Exception sending context initialized event to listener instance of class org.apache.struts2.tiles.StrutsTilesListener java.lang.IllegalStateException: RendererFactory not specified I tried adding additional Tiles configuration information as specified at: http://struts.apache.org/2.x/docs/tiles-plugin.html and http://tiles.apache.org/tutorial/configuration.html using the context-param and listener, but with the same error. This exception is not thrown with Tiles 2.0.5. I did not see a tag for tiles 2.0.6 in the SVN tree, where can I get the tiles-2.0.6-snapshot? Any help would be appreciated! MG -Original Message- From: Griffith, Michael * [mailto:[EMAIL PROTECTED] Sent: Friday, March 07, 2008 4:44 PM To: Struts Users Mailing List Subject: RE: How can I combine a result (tiles + xslt)? Dave, I did. I will try both, easy path first. I'll let you know what I find so that you can close the JIRA incident I opened. I did look at the JIRA ticket Antonio posted, and it seems likely that is the problem. Thanks to all that replied, especially all the extra effort that Martin went to. Cheers! MG -Original Message- From: Dave Newton [mailto:[EMAIL PROTECTED] Sent: Friday, March 07, 2008 12:45 PM To: Struts Users Mailing List Subject: Re: How can I combine a result (tiles + xslt)? Did you see Antonio's post about how it's probably a bug in Tiles?! Seems like it would be quite a bit easier to try his idea than all this. --- Martin Gainty <[EMAIL PROTECTED]> wrote: > Good Afternoon Michael > > I just ran thru the scenario you described on a 'healthy' jsp page and see > this debug output: > 03-07 12:58:52,718 DEBUG > (org.apache.struts2.interceptor.validation.AnnotationValidationIntercept or:1 > 34) - Validating /tags/non-ui/actionTag/form with method execute. > 2000-03-07 12:58:52,734 DEBUG > (org.apache.struts2.dispatcher.ServletDispatcherResult:113) - Forwarding to > location /tags/non-ui/iteratorTag/done.jsp > [GC [DefNew: 3968K->0K(4032K), 0.0108816 secs] 49623K->47040K(68568K), > 0.0109704 secs] > [GC [DefNew: 3968K->0K(4032K), 0.0168407 secs] 51008K->48964K(68568K), > 0.0169301 secs] > 2000-03-07 12:58:52,906 DEBUG (org.apache.struts2.components.UIBean:526) - > Rendering template /template/xhtml/a > 2000-03-07 12:58:52,921 DEBUG > (org.apache.struts2.components.template.FreemarkerTemplateEngine:135) - > Rendering template /template/simple/a.ftl > [GC [DefNew: 3968K->0K(4032K), 0.0051196 secs] 52932K->49117K(68568K), > 0.0052029 secs] > 2000-03-07 12:58:52,937 DEBUG (org.apache.struts2.components.UIBean:526) - > Rendering template /template/xhtml/a-close > 2000-03-07 12:58:52,953 DEBUG > (org.apache.struts2.components.template.FreemarkerTemplateEngine:135) - > Rendering template /template/simple/a-close.ftl > 2000-03-07 12:58:52,953 DEBUG > (org.apache.struts2.dispatcher.ActionContextCleanUp:122) - skipping cleanup > counter=1 > [GC [DefNew: 3966K->0K(4032K), 0.0038605 secs] 53083K->49280K(68568K), > 0.0039430 secs] > [GC [DefNew: 3968K->0K(4032K), 0.0232088 secs] 53248K->52251K(68568K), > 0.0232965 secs] > [GC [1 CMS-initial-mark: 52251K(64536K)] 52251K(68568K), 0.0012270 secs] > [CMS-concurrent-mark: 0.361/0.361 secs] > > to repeat the scenario- > deploy struts2-showcase-2.0.11 to TC (its a monster so this will take a > while..) > vi /tags/non-ui/actionTag/showActionTagDemo.jsp > add these lines to showActionTagDemo.jsp > > > > > ignoreContextParams="true"/> > > > > add these configuration lines to /WEB-INF/classes/struts-tags-non-ui.xml to > configure in a 'healthy' action class and a result > > /tags/non-ui/iteratorTag/done.jsp > > > insert the following jsp to /tags/non-ui/iteratorTag/date.jsp > <[EMAIL PROTECTED] prefix="s" uri="/struts-tags" %> > > > This is done.jsp > > > This is done.jsp > > > > in a scratch folder create the necessary ActionTagDemo folder > use the following build.xml for building with > ant compile > > > > > > > > > > > > > > > > > > location="/struts/struts-2.0.11/lib/struts2-core-2.0.11.jar"/> > > > > > > > location=":/SPRING/spring-framework-2.0.6/target/mock-classes"/> > > > > > > >
Re: How can I combine a result (tiles + xslt)?
2008/3/10, Griffith, Michael * <[EMAIL PROTECTED]>: > I checked out the current branch from the Tiles SVN repository: > http://svn.apache.org/repos/asf/tiles/framework/trunk/ and built it. > Version is 2.1.0-SNAPSHOT. This appears to be incompatible with the > Struts2Tiles plugin? It is incompatible at the moment. Use the TILES_2_0_X instead. Antonio - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: How can I combine a result (tiles + xslt)?
Antonio, Thanks for your help. For some reason, it didn't register to me that the TILES_2_0_X branch would be the 2.0.6 branch... duh. I downloaded the Tiles 2.0.X source and built the 2.0.6 snapshot. It did not fix the IO Stream error previously reported, so I am unsure if the issue is related. I believe (maybe incorrectly so) that the problem is caused by the XSLTResult calling close/flush when processing the result. https://issues.apache.org/struts/browse/WW-2538 MG -Original Message- From: Griffith, Michael * [mailto:[EMAIL PROTECTED] Sent: Friday, March 07, 2008 4:44 PM To: Struts Users Mailing List Subject: RE: How can I combine a result (tiles + xslt)? Dave, I did. I will try both, easy path first. I'll let you know what I find so that you can close the JIRA incident I opened. I did look at the JIRA ticket Antonio posted, and it seems likely that is the problem. Thanks to all that replied, especially all the extra effort that Martin went to. Cheers! MG -Original Message- From: Dave Newton [mailto:[EMAIL PROTECTED] Sent: Friday, March 07, 2008 12:45 PM To: Struts Users Mailing List Subject: Re: How can I combine a result (tiles + xslt)? Did you see Antonio's post about how it's probably a bug in Tiles?! Seems like it would be quite a bit easier to try his idea than all this. --- Martin Gainty <[EMAIL PROTECTED]> wrote: > Good Afternoon Michael > > I just ran thru the scenario you described on a 'healthy' jsp page and see > this debug output: > 03-07 12:58:52,718 DEBUG > (org.apache.struts2.interceptor.validation.AnnotationValidationIntercept or:1 > 34) - Validating /tags/non-ui/actionTag/form with method execute. > 2000-03-07 12:58:52,734 DEBUG > (org.apache.struts2.dispatcher.ServletDispatcherResult:113) - Forwarding to > location /tags/non-ui/iteratorTag/done.jsp > [GC [DefNew: 3968K->0K(4032K), 0.0108816 secs] 49623K->47040K(68568K), > 0.0109704 secs] > [GC [DefNew: 3968K->0K(4032K), 0.0168407 secs] 51008K->48964K(68568K), > 0.0169301 secs] > 2000-03-07 12:58:52,906 DEBUG (org.apache.struts2.components.UIBean:526) - > Rendering template /template/xhtml/a > 2000-03-07 12:58:52,921 DEBUG > (org.apache.struts2.components.template.FreemarkerTemplateEngine:135) - > Rendering template /template/simple/a.ftl > [GC [DefNew: 3968K->0K(4032K), 0.0051196 secs] 52932K->49117K(68568K), > 0.0052029 secs] > 2000-03-07 12:58:52,937 DEBUG (org.apache.struts2.components.UIBean:526) - > Rendering template /template/xhtml/a-close > 2000-03-07 12:58:52,953 DEBUG > (org.apache.struts2.components.template.FreemarkerTemplateEngine:135) - > Rendering template /template/simple/a-close.ftl > 2000-03-07 12:58:52,953 DEBUG > (org.apache.struts2.dispatcher.ActionContextCleanUp:122) - skipping cleanup > counter=1 > [GC [DefNew: 3966K->0K(4032K), 0.0038605 secs] 53083K->49280K(68568K), > 0.0039430 secs] > [GC [DefNew: 3968K->0K(4032K), 0.0232088 secs] 53248K->52251K(68568K), > 0.0232965 secs] > [GC [1 CMS-initial-mark: 52251K(64536K)] 52251K(68568K), 0.0012270 secs] > [CMS-concurrent-mark: 0.361/0.361 secs] > > to repeat the scenario- > deploy struts2-showcase-2.0.11 to TC (its a monster so this will take a > while..) > vi /tags/non-ui/actionTag/showActionTagDemo.jsp > add these lines to showActionTagDemo.jsp > > > > > ignoreContextParams="true"/> > > > > add these configuration lines to /WEB-INF/classes/struts-tags-non-ui.xml to > configure in a 'healthy' action class and a result > > /tags/non-ui/iteratorTag/done.jsp > > > insert the following jsp to /tags/non-ui/iteratorTag/date.jsp > <[EMAIL PROTECTED] prefix="s" uri="/struts-tags" %> > > > This is done.jsp > > > This is done.jsp > > > > in a scratch folder create the necessary ActionTagDemo folder > use the following build.xml for building with > ant compile > > > > > > > > > > > > > > > > > > location="/struts/struts-2.0.11/lib/struts2-core-2.0.11.jar"/> > > > > > > > location=":/SPRING/spring-framework-2.0.6/target/mock-classes"/> > > > > > > > > > > location="/SPRING/SPRING~1.5/SPRING~1.5-W/SPRING~1.5/dist/spring.jar"/> > > > > > > > > > depends="dist" > description="default: build everything" > /> > > > > > > > depends="c
Re: How can I combine a result (tiles + xslt)?
2008/3/10, Griffith, Michael * <[EMAIL PROTECTED]>: > > I believe (maybe incorrectly so) that the problem is caused by the > XSLTResult calling close/flush when processing the result. Mmm... It reminds me a thing. When processing an XML file via a XML parser, the parser closes the stream at the end! To work around this problem, I had to wrap the original InputStream into an object that overrides the "close" method, not closing the stream. Antonio
RE: How can I combine a result (tiles + xslt)?
Antonio, Would you then agree this is a bug or enhancement that could be made to the XSLTResult? Maybe a flush parameter could be added to the configuration of the result? MG -Original Message- From: Antonio Petrelli [mailto:[EMAIL PROTECTED] Sent: Tuesday, March 11, 2008 2:25 AM To: Struts Users Mailing List Subject: Re: How can I combine a result (tiles + xslt)? 2008/3/10, Griffith, Michael * <[EMAIL PROTECTED]>: > > I believe (maybe incorrectly so) that the problem is caused by the > XSLTResult calling close/flush when processing the result. Mmm... It reminds me a thing. When processing an XML file via a XML parser, the parser closes the stream at the end! To work around this problem, I had to wrap the original InputStream into an object that overrides the "close" method, not closing the stream. Antonio - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How can I combine a result (tiles + xslt)?
2008/3/11, Griffith, Michael * <[EMAIL PROTECTED]>: > > Would you then agree this is a bug or enhancement that could be made to > the XSLTResult? Maybe a flush parameter could be added to the > configuration of the result? I don't think it is a bug of XSLTResult, since it "closes" (not simply "flushes") the stream. The fact that the parser closes the stream is in the XML specification (yeah, this is *stupid* but they did it). Anyway probably XSLTResult needs a workaround for this feature since we cannot change the specifications. Antonio
RE: How can I combine a result (tiles + xslt)?
Antonio, First of all, I'm not saying you are wrong about XSLT closing the result stream -- I don't have enough knowledge to comment on that problem, however... Here's what I did to test this. I copied the source for XSLTResult to a new class, and added a boolean parameter to the result called flush. In my struts.xml file, I set the parameter to false (or let it default) and put an if statement around the out.close() method in XSLTResult.execute, line 357. So the code looks like this: if( getFlush() ){ LOG.debug("Flushing output stream"); out.close(); // ...and flush... } Sure enough, if the flag is true, the stream is closed and the exception occurs. If the flag is false, and the close() gets stepped over, the stream is left open and the remainder of the tiles render. The XSLTResult class isn't really well structured to act as a superclass, so unfortunately, in order to get this to work I have to copy the class to a new class and add this implementation. I would argue this is a bug in XSLTResult. Thanks for your comments and support. MG -Original Message- From: Antonio Petrelli [mailto:[EMAIL PROTECTED] Sent: Tuesday, March 11, 2008 8:31 AM To: Struts Users Mailing List Subject: Re: How can I combine a result (tiles + xslt)? 2008/3/11, Griffith, Michael * <[EMAIL PROTECTED]>: > > Would you then agree this is a bug or enhancement that could be made to > the XSLTResult? Maybe a flush parameter could be added to the > configuration of the result? I don't think it is a bug of XSLTResult, since it "closes" (not simply "flushes") the stream. The fact that the parser closes the stream is in the XML specification (yeah, this is *stupid* but they did it). Anyway probably XSLTResult needs a workaround for this feature since we cannot change the specifications. Antonio - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How can I combine a result (tiles + xslt)?
2008/3/12, Griffith, Michael * <[EMAIL PROTECTED]>: > > if( getFlush() ){ > LOG.debug("Flushing output stream"); > out.close(); // ...and flush... > } Yup you're right! Please open a JIRA issue: https://issues.apache.org/struts/browse/WW In fact the code in the trunk does not verify if "flush" flag is on, and this code is a bit obscure to me: http://svn.apache.org/repos/asf/struts/struts2/trunk/core/src/main/java/org/apache/struts2/views/xslt/XSLTResult.java Why does it take *twice* the response's writer, and closes and flushes it? If you can, please post a patch to the issue that you will create. Ciao Antonio
Re: How can I combine a result (tiles + xslt)?
2008/3/13, Antonio Petrelli <[EMAIL PROTECTED]>: > > 2008/3/12, Griffith, Michael * <[EMAIL PROTECTED]>: > > > > if( getFlush() ){ > > LOG.debug("Flushing output stream"); > > out.close(); // ...and flush... > > } > > > > Yup you're right! Please open a JIRA issue: > https://issues.apache.org/struts/browse/WW > There's no need for it, Micheal. Martin Gainty already opened it: https://issues.apache.org/struts/browse/WW-2551 Antonio