You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Matthew Seaborn <Ma...@performgroup.com> on 2008/04/10 16:00:35 UTC

Struts2, SiteMesh and Struts Menu

Has anyone had any experience of using these three together?  I have Struts 2 and SiteMesh working together happily, but soon as I add Struts Menu I get the error below.

I believe it is due to SiteMesh and not Struts 2 but am not sure on this.

Has anyone seen this before?

Thanks.


javax.servlet.ServletException: Stream closed
            org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:515)
            org.apache.struts2.dispatcher.FilterDispatcher.doFilter(FilterDispatcher.java:419)
            com.opensymphony.module.sitemesh.filter.PageFilter.parsePage(PageFilter.java:119)
            com.opensymphony.module.sitemesh.filter.PageFilter.doFilter(PageFilter.java:55)
            org.apache.struts2.dispatcher.ActionContextCleanUp.doFilter(ActionContextCleanUp.java:99)

root cause

java.io.IOException: Stream closed
            org.apache.jasper.runtime.JspWriterImpl.ensureOpen(JspWriterImpl.java:203)
            org.apache.jasper.runtime.JspWriterImpl.flushBuffer(JspWriterImpl.java:114)
            org.apache.jasper.runtime.JspWriterImpl.flush(JspWriterImpl.java:172)
            org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:954)
            org.apache.jasper.runtime.PageContextImpl.include(PageContextImpl.java:614)
            org.apache.struts2.dispatcher.ServletDispatcherResult.doExecute(ServletDispatcherResult.java:119)
            org.apache.struts2.dispatcher.StrutsResultSupport.execute(StrutsResultSupport.java:178)
            com.opensymphony.xwork2.DefaultActionInvocation.executeResult(DefaultActionInvocation.java:348)
            com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:253)
            org.apache.struts2.impl.StrutsActionProxy.execute(StrutsActionProxy.java:50)
            org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:504)
            org.apache.struts2.dispatcher.FilterDispatcher.doFilter(FilterDispatcher.java:419)
            com.opensymphony.module.sitemesh.filter.PageFilter.parsePage(PageFilter.java:119)
            com.opensymphony.module.sitemesh.filter.PageFilter.doFilter(PageFilter.java:55)
            org.apache.struts2.dispatcher.ActionContextCleanUp.doFilter(ActionContextCleanUp.java:99)









Matthew Seaborn
Software Architect
t    +44(0) 208 484 0729
m  +44(0) 7949 465 142
e   matthew.seaborn@performgroup.com<ma...@performgroup.com>

[cid:image001.jpg@01C89B1B.A3B79980]
Sussex House
Plane Tree Crescent
Feltham, Middlesex, TW13 7HE
United Kingdom
http://www.performgroup.com/




________________________________________________________________________

CONFIDENTIALITY - This email and any files transmitted with it, are confidential, may be legally privileged and are intended solely for the use of the individual or entity to whom they are addressed. If this has come to you in error, you must not copy, distribute, disclose or use any of the information it contains. Please notify the sender immediately and delete them from your system.

SECURITY - Please be aware that communication by email, by its very nature, is not 100% secure and by communicating with Perform Group by email you consent to us monitoring and reading any such correspondence.

VIRUSES - Although this email message has been scanned for the presence of computer viruses, the sender accepts no liability for any damage sustained as a result of a computer virus and it is the recipient�s responsibility to ensure that email is virus free.

AUTHORITY - Any views or opinions expressed in this email are solely those of the sender and do not necessarily represent those of Perform Group.

COPYRIGHT - Copyright of this email and any attachments belongs to Perform Group, Companies House Registration number 6324278.

RE: Struts2, SiteMesh and Struts Menu

Posted by Matthew Seaborn <Ma...@performgroup.com>.
Discovered it was a simple case of user (i.e. my) error.

The actual problem was "The displayer mapping for the specified MenuDisplayer does not exist." which was causing the JSP to not be rendered and thus resulting  in SiteMesh to report the error I detailed previusly.

-----Original Message-----
From: Al Sutton [mailto:al.sutton@alsutton.com]
Sent: 10 April 2008 16:42
To: Struts Users Mailing List
Subject: Re: Struts2, SiteMesh and Struts Menu

I'm using the combination you mention without any problems.

Check the order you're using the servlet filters in, mine is;


<filter>
 <filter-name>struts-cleanup</filter-name>
 <filter-class>org.apache.struts2.dispatcher.ActionContextCleanUp</filter-class></filter><filter> <filter-name>sitemesh</filter-name> <filter-class>com.opensymphony.module.sitemesh.filter.PageFilter</filter-class></filter><filter> <filter-name>struts</filter-name> <filter-class>org.apache.struts2.dispatcher.FilterDispatcher</filter-class></filter><filter> <filter-name>struts-cleanup</filter-name> <url-pattern>/*</url-pattern></filter-mapping><filter-mapping> <filter-name>sitemesh</filter-name> <url-pattern>/*</url-pattern></filter-mapping><filter-mapping> <filter-name>struts</filter-name> <url-pattern>/*</url-pattern></filter-mapping>.... Other filters here .....and for Struts Menu I use the listener; <listener>  <listener-class>net.sf.navigator.menu.MenuContextListener</listener-class> </listener>Hope this helps.Al.----- Original Message -----From: Matthew SeabornTo: 'Struts Users Mailing List'Sent: Thursday, April 10, 2008 3:00 PMSubject: Struts2, SiteMesh and Struts MenuHa
 s anyone had any experience of using these three together?  I have Struts2 and SiteMesh working together happily, but soon as I add Struts Menu I getthe error below.I believe it is due to SiteMesh and not Struts 2 but am not sure on this.Has anyone seen this before?Thanks.javax.servlet.ServletException: Stream closed            org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:515)            org.apache.struts2.dispatcher.FilterDispatcher.doFilter(FilterDispatcher.java:419)            com.opensymphony.module.sitemesh.filter.PageFilter.parsePage(PageFilter.java:119)            com.opensymphony.module.sitemesh.filter.PageFilter.doFilter(PageFilter.java:55)            org.apache.struts2.dispatcher.ActionContextCleanUp.doFilter(ActionContextCleanUp.java:99)root causejava.io.IOException: Stream closed            org.apache.jasper.runtime.JspWriterImpl.ensureOpen(JspWriterImpl.java:203)            org.apache.jasper.runtime.JspWriterImpl.flushBuffer(JspWriterIm
 pl.java:114)            org.apache.jasper.runtime.JspWriterImpl.flush(JspWriterImpl.java:172)            org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:954)            org.apache.jasper.runtime.PageContextImpl.include(PageContextImpl.java:614)            org.apache.struts2.dispatcher.ServletDispatcherResult.doExecute(ServletDispatcherResult.java:119)            org.apache.struts2.dispatcher.StrutsResultSupport.execute(StrutsResultSupport.java:178)            com.opensymphony.xwork2.DefaultActionInvocation.executeResult(DefaultActionInvocation.java:348)            com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:253)            org.apache.struts2.impl.StrutsActionProxy.execute(StrutsActionProxy.java:50)            org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:504)            org.apache.struts2.dispatcher.FilterDispatcher.doFilter(FilterDispatcher.java:419)            com.opensymphony.modul
 e.sitemesh.filter.PageFilter.parsePage(PageFilter.java:119)            com.opensymphony.module.sitemesh.filter.PageFilter.doFilter(PageFilter.java:55)            org.apache.struts2.dispatcher.ActionContextCleanUp.doFilter(ActionContextCleanUp.java:99)Matthew SeabornSoftware Architectt    +44(0) 208 484 0729m  +44(0) 7949 465 142e   matthew.seaborn@performgroup.comSussex HousePlane Tree CrescentFeltham, Middlesex, TW13 7HEUnited Kingdomhttp://www.performgroup.com/________________________________________________________________________CONFIDENTIALITY - This email and any files transmitted with it, areconfidential, may be legally privileged and are intended solely for the useof the individual or entity to whom they are addressed. If this has come toyou in error, you must not copy, distribute, disclose or use any of theinformation it contains. Please notify the sender immediately and deletethem from your system.SECURITY - Please be aware that communication by email, by its very
 nature,is not 100% secure and by communicating with Perform Group by email youconsent to us monitoring and reading any such correspondence.VIRUSES - Although this email message has been scanned for the presence ofcomputer viruses, the sender accepts no liability for any damage sustainedas a result of a computer virus and it is the recipient's responsibility toensure that email is virus free.AUTHORITY - Any views or opinions expressed in this email are solely thoseof the sender and do not necessarily represent those of Perform Group.COPYRIGHT - Copyright of this email and any attachments belongs to PerformGroup, Companies House Registration number 6324278.

________________________________________________________________________

CONFIDENTIALITY - This email and any files transmitted with it, are confidential, may be legally privileged and are intended solely for the use of the individual or entity to whom they are addressed. If this has come to you in error, you must not copy, distribute, disclose or use any of the information it contains. Please notify the sender immediately and delete them from your system.

SECURITY - Please be aware that communication by email, by its very nature, is not 100% secure and by communicating with Perform Group by email you consent to us monitoring and reading any such correspondence.

VIRUSES - Although this email message has been scanned for the presence of computer viruses, the sender accepts no liability for any damage sustained as a result of a computer virus and it is the recipient�s responsibility to ensure that email is virus free.

AUTHORITY - Any views or opinions expressed in this email are solely those of the sender and do not necessarily represent those of Perform Group.

COPYRIGHT - Copyright of this email and any attachments belongs to Perform Group, Companies House Registration number 6324278.

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: Struts2, SiteMesh and Struts Menu

Posted by Al Sutton <al...@alsutton.com>.
I'm using the combination you mention without any problems.

Check the order you're using the servlet filters in, mine is;


<filter>
 <filter-name>struts-cleanup</filter-name>
 <filter-class>org.apache.struts2.dispatcher.ActionContextCleanUp</filter-class></filter><filter> <filter-name>sitemesh</filter-name> <filter-class>com.opensymphony.module.sitemesh.filter.PageFilter</filter-class></filter><filter> <filter-name>struts</filter-name> <filter-class>org.apache.struts2.dispatcher.FilterDispatcher</filter-class></filter><filter> <filter-name>struts-cleanup</filter-name> <url-pattern>/*</url-pattern></filter-mapping><filter-mapping> <filter-name>sitemesh</filter-name> <url-pattern>/*</url-pattern></filter-mapping><filter-mapping> <filter-name>struts</filter-name> <url-pattern>/*</url-pattern></filter-mapping>.... Other filters here .....and for Struts Menu I use the listener; <listener>  <listener-class>net.sf.navigator.menu.MenuContextListener</listener-class> </listener>Hope this helps.Al.----- Original Message -----From: Matthew SeabornTo: 'Struts Users Mailing List'Sent: Thursday, April 10, 2008 3:00 PMSubject: Struts2, SiteMesh and Struts MenuHa
 s anyone had any experience of using these three together?  I have Struts2 and SiteMesh working together happily, but soon as I add Struts Menu I getthe error below.I believe it is due to SiteMesh and not Struts 2 but am not sure on this.Has anyone seen this before?Thanks.javax.servlet.ServletException: Stream closed            org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:515)            org.apache.struts2.dispatcher.FilterDispatcher.doFilter(FilterDispatcher.java:419)            com.opensymphony.module.sitemesh.filter.PageFilter.parsePage(PageFilter.java:119)            com.opensymphony.module.sitemesh.filter.PageFilter.doFilter(PageFilter.java:55)            org.apache.struts2.dispatcher.ActionContextCleanUp.doFilter(ActionContextCleanUp.java:99)root causejava.io.IOException: Stream closed            org.apache.jasper.runtime.JspWriterImpl.ensureOpen(JspWriterImpl.java:203)            org.apache.jasper.runtime.JspWriterImpl.flushBuffer(JspWriterIm
 pl.java:114)            org.apache.jasper.runtime.JspWriterImpl.flush(JspWriterImpl.java:172)            org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:954)            org.apache.jasper.runtime.PageContextImpl.include(PageContextImpl.java:614)            org.apache.struts2.dispatcher.ServletDispatcherResult.doExecute(ServletDispatcherResult.java:119)            org.apache.struts2.dispatcher.StrutsResultSupport.execute(StrutsResultSupport.java:178)            com.opensymphony.xwork2.DefaultActionInvocation.executeResult(DefaultActionInvocation.java:348)            com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:253)            org.apache.struts2.impl.StrutsActionProxy.execute(StrutsActionProxy.java:50)            org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:504)            org.apache.struts2.dispatcher.FilterDispatcher.doFilter(FilterDispatcher.java:419)            com.opensymphony.modul
 e.sitemesh.filter.PageFilter.parsePage(PageFilter.java:119)            com.opensymphony.module.sitemesh.filter.PageFilter.doFilter(PageFilter.java:55)            org.apache.struts2.dispatcher.ActionContextCleanUp.doFilter(ActionContextCleanUp.java:99)Matthew SeabornSoftware Architectt    +44(0) 208 484 0729m  +44(0) 7949 465 142e   matthew.seaborn@performgroup.comSussex HousePlane Tree CrescentFeltham, Middlesex, TW13 7HEUnited Kingdomhttp://www.performgroup.com/________________________________________________________________________CONFIDENTIALITY - This email and any files transmitted with it, areconfidential, may be legally privileged and are intended solely for the useof the individual or entity to whom they are addressed. If this has come toyou in error, you must not copy, distribute, disclose or use any of theinformation it contains. Please notify the sender immediately and deletethem from your system.SECURITY - Please be aware that communication by email, by its very 
 nature,is not 100% secure and by communicating with Perform Group by email youconsent to us monitoring and reading any such correspondence.VIRUSES - Although this email message has been scanned for the presence ofcomputer viruses, the sender accepts no liability for any damage sustainedas a result of a computer virus and it is the recipient's responsibility toensure that email is virus free.AUTHORITY - Any views or opinions expressed in this email are solely thoseof the sender and do not necessarily represent those of Perform Group.COPYRIGHT - Copyright of this email and any attachments belongs to PerformGroup, Companies House Registration number 6324278.

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org