5 Replies Latest reply on Mar 4, 2003 8:43 PM by Michael Dinsmore

    sitemesh

    Christian Riege Newbie

      neither sitemesh 1.4 nor 1.5 work with jetty (jboss-3.0.1RC1). there's a description of the problem on the sitemesh site (seems to be an issue with Jasper); is there a known work-around for this?

        • 1. Re: sitemesh
          Julian Gosnell Expert

          www.jboss.org is running sitemesh as we speak - on cvs HEAD.

          Jules

          • 2. Re: sitemesh
            Christian Riege Newbie

            hm, ok. when i deploy the sitemesh-example.war which comes with sitemesh 1.5 on my JBoss Server (either 3.0.1 or CVS HEAD), I get the following exception:

            11:22:22,295 INFO [MainDeployer] Deployed package: file:/usr/src/cvs/jboss/head/jboss/build/output/jboss-3.1.0alpha/server/default/deploy/sitemesh-example.war
            11:22:33,525 ERROR [STDERR] java.lang.IllegalStateException: getOutputStream called
            11:22:33,528 ERROR [STDERR] at org.mortbay.jetty.servlet.Dispatcher$DispatcherResponse.getWriter(Dispatcher.java:475)
            11:22:33,531 ERROR [STDERR] at org.apache.jasper.runtime.JspWriterImpl.initOut(JspWriterImpl.java:166)
            11:22:33,532 ERROR [STDERR] at org.apache.jasper.runtime.JspWriterImpl.flushBuffer(JspWriterImpl.java:158)
            11:22:33,534 ERROR [STDERR] at org.apache.jasper.runtime.JspWriterImpl.flush(JspWriterImpl.java:205)
            11:22:33,536 ERROR [STDERR] at org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:808)
            11:22:33,538 ERROR [STDERR] at org.apache.jasper.runtime.PageContextImpl.include(PageContextImpl.java:391)
            11:22:33,540 ERROR [STDERR] at com.opensymphony.module.sitemesh.taglib.page.ApplyDecoratorTag.doEndTag(Unknown Source)
            11:22:33,542 ERROR [STDERR] at org.apache.jsp.main$jsp._jspService(main$jsp.java:118)
            11:22:33,544 ERROR [STDERR] at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107)
            11:22:33,546 ERROR [STDERR] at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)

            [stacktrace continues but i think is irrelevant below].

            is this a bug in their example code?! i tried the workaround they mentions (rename .html to .jsp) but no luck.

            • 3. Re: sitemesh
              Greg Wilkins Newbie

              This is a known sitemesh bug that causes it to fail on Jasper. So it will effect tomcat and Jetty:

              http://jira.opensymphony.com/ViewIssue.jspa?key=SIM-16

              • 4. Re: sitemesh
                Michael Dinsmore Newbie

                The funny thing is, if you go to the bug listing [http://jira.opensymphony.com/ViewIssue.jspa?key=SIM-16] if says the problems is 'resolved' but not fixed. I still get the error.

                I downloaded the v1.5 and it came up:

                14:31:53:578 [SocketListener-1] WARN org.jboss.jbossweb - WARNING: Exception for /sitemesh-example/
                java.lang.IllegalStateException: getOutputStream called
                at org.mortbay.jetty.servlet.Dispatcher$DispatcherResponse.getWriter(Dispatcher.java:514)
                at org.apache.jasper.runtime.JspWriterImpl.initOut(JspWriterImpl.java:166)
                ...


                so I thought, "well it isn't in the distro yet". So I used the CVS command-line tool to pull the source out and build it locally:

                cvs -d :pserver:anonymous@cvs.opensymphony.sourceforge.net:/cvsroot/opensymphony checkout sitemesh

                but I still got the error. So, I'm still at a loss if the 'resolved' status really means 'fixed'? Anyone get this to work?

                • 5. Re: sitemesh
                  Michael Dinsmore Newbie

                  Hmmm... I've treid a few more things and it still doesn't seem to work. I wonder how someone said they got it to work earlier in this thread!

                  I checked out, per someone's suggestion, the source code from the HEAD:

                  cvs -d :pserver:anonymous@cvs.opensymphony.sourceforge.net:/cvsroot/opensymphony checkout -r HEAD sitemesh

                  and then compiled it (ant) which went fine. Then I copied the JAR file to the JBoss 3.2RC2 distribution (with Jetty) in the ..server/default/lib directory, then alos copied over the sitemesh-manual (renamed to sitemesh-manual.war) to the ../server/default/deploy directory.

                  I still get the error (in brief):

                  20:50:32,812 INFO [Server] JBoss (MX MicroKernel) [3.2.0RC2 (build: CVSTag=JBoss_3_2_0_RC2 date=200302171630)] Started in 40s:8
                  44ms
                  20:51:12,875 WARN [jbossweb] WARNING: Exception for /sitemesh-manual/
                  java.lang.IllegalStateException: getOutputStream called
                  at org.mortbay.jetty.servlet.Dispatcher$DispatcherResponse.getWriter(Dispatcher.java:498)
                  at org.apache.jasper.runtime.JspWriterImpl.initOut(JspWriterImpl.java:173)
                  at org.apache.jasper.runtime.JspWriterImpl.flushBuffer(JspWriterImpl.java:166)
                  at org.apache.jasper.runtime.JspWriterImpl.flush(JspWriterImpl.java:207)
                  at org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:810)
                  at org.apache.jasper.runtime.PageContextImpl.include(PageContextImpl.java:398)
                  at com.opensymphony.module.sitemesh.taglib.page.ApplyDecoratorTag.doEndTag(Unknown Source)
                  at org.apache.jsp.main_jsp._jspx_meth_page_applyDecorator_0(main_jsp.java:212)
                  at org.apache.jsp.main_jsp._jspService(main_jsp.java:146)
                  at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:137)
                  ...

                  Any suggestions? Anyone get this working with JBoss/Jetty?

                  Thanks for any help.