13 Replies Latest reply on Nov 30, 2005 2:30 PM by Woodler

    JBoss Portal 2.2 CVS-HEAD, Layouts

    Keith Davis Newbie

      All,

      Been through the forums, docs and source.

      I am creating a theme and layout WAR for version 2.2 of the portal from CVS HEAD (11/16/2005). The theme works, basically copied the industrial theme from the source tree into my web app project. I tried doing the same with the generic layout from the source tree. I have the layout descriptor in my project with the supporting files, etc. I am getting a ClassCastException when I try to select the layout using the theme selector portlet.

      I can post the actual stack trace however I wanted to know if I may be missing something obvious first or more detailed docs on deploying custom layouts in a separate web application.

      -Keith

        • 1. Re: JBoss Portal 2.2 CVS-HEAD, Layouts
          Roy Russo Master

          Post the stack trace and maybe ZenMartin can have a looksee.

          • 2. Re: JBoss Portal 2.2 CVS-HEAD, Layouts
            Keith Davis Newbie

            Thanks...

            I will post the trace along with the WAR later today.

            -Keith

            • 3. Re: JBoss Portal 2.2 CVS-HEAD, Layouts
              Keith Davis Newbie

              Here is the stack trace:

              2005-11-15 16:58:19,594 ERROR [org.jboss.portal.server.servlet.CommandFilter] Exception in command invocation
              org.apache.jasper.JasperException: org.jboss.portal.theme.page.PageResponse
               at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:370)
               at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
               at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
               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.portal.theme.LayoutDispatcher.execute(LayoutDispatcher.java:95)
               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:585)
               at org.jboss.portal.server.servlet.CommandFilter.doFilter(CommandFilter.java:54)
               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.ApplicationDispatcher.invoke(ApplicationDispatcher.java:672)
               at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:574)
               at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:499)
               at org.jboss.portal.theme.LayoutDispatcher.include(LayoutDispatcher.java:130)
               at org.jboss.portal.core.command.RenderPageCommand.renderMarkup(RenderPageCommand.java:149)
               at org.jboss.portal.core.command.RenderPageCommand.renderPortlets(RenderPageCommand.java:281)
               at org.jboss.portal.core.command.RenderPageCommand.execute(RenderPageCommand.java:135)
               at org.jboss.portal.core.command.ControllerCommand.dispatch(ControllerCommand.java:65)
               at org.jboss.portal.server.invocation.Invocation.invokeNext(Invocation.java:125)
               at org.jboss.portal.core.aspects.controller.EventBroadcasterInterceptor.invoke(EventBroadcasterInterceptor.java:72)
               at org.jboss.portal.core.command.CommandInterceptor.invoke(CommandInterceptor.java:25)
               at org.jboss.portal.server.invocation.Invocation.invokeNext(Invocation.java:115)
               at org.jboss.portal.core.aspects.controller.PolicyEnforcementInterceptor.invoke(PolicyEnforcementInterceptor.java:112)
               at org.jboss.portal.core.command.CommandInterceptor.invoke(CommandInterceptor.java:25)
               at org.jboss.portal.server.invocation.Invocation.invokeNext(Invocation.java:115)
               at org.jboss.portal.core.aspects.controller.PortalNodeInterceptor.invoke(PortalNodeInterceptor.java:48)
               at org.jboss.portal.core.command.CommandInterceptor.invoke(CommandInterceptor.java:25)
               at org.jboss.portal.server.invocation.Invocation.invokeNext(Invocation.java:115)
               at org.jboss.portal.core.aspects.controller.NavigationInterceptor.invoke(NavigationInterceptor.java:45)
               at org.jboss.portal.core.command.CommandInterceptor.invoke(CommandInterceptor.java:25)
               at org.jboss.portal.server.invocation.Invocation.invokeNext(Invocation.java:115)
               at org.jboss.portal.server.invocation.Invocation.invoke(Invocation.java:150)
               at org.jboss.portal.core.command.CommandContext.execute(CommandContext.java:94)
               at org.jboss.portal.core.command.ExecutionContext.execute(ExecutionContext.java:80)
               at org.jboss.portal.core.command.ExecutionContext.execute(ExecutionContext.java:64)
               at org.jboss.portal.core.CoreController.handle(CoreController.java:200)
               at sun.reflect.GeneratedMethodAccessor134.invoke(Unknown Source)
               at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
               at java.lang.reflect.Method.invoke(Method.java:585)
               at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
               at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
               at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:118)
               at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
               at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:127)
               at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
               at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:245)
               at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
               at org.jboss.mx.util.JMXInvocationHandler.invoke(JMXInvocationHandler.java:273)
               at $Proxy102.handle(Unknown Source)
               at org.jboss.portal.server.ServerInvocation.dispatch(ServerInvocation.java:63)
               at org.jboss.portal.server.invocation.Invocation.invokeNext(Invocation.java:125)
               at org.jboss.portal.core.aspects.server.PolicyAssociationInterceptor.invoke(PolicyAssociationInterceptor.java:41)
               at org.jboss.portal.server.ServerInterceptor.invoke(ServerInterceptor.java:25)
               at org.jboss.portal.server.invocation.Invocation.invokeNext(Invocation.java:115)
               at org.jboss.portal.server.aspects.server.ContentTypeInterceptor.invoke(ContentTypeInterceptor.java:55)
               at org.jboss.portal.server.ServerInterceptor.invoke(ServerInterceptor.java:25)
               at org.jboss.portal.server.invocation.Invocation.invokeNext(Invocation.java:115)
               at org.jboss.portal.core.aspects.server.LocaleInterceptor.invoke(LocaleInterceptor.java:58)
               at org.jboss.portal.server.ServerInterceptor.invoke(ServerInterceptor.java:25)
               at org.jboss.portal.server.invocation.Invocation.invokeNext(Invocation.java:115)
               at org.jboss.portal.core.aspects.server.UserInterceptor.invoke(UserInterceptor.java:162)
               at org.jboss.portal.server.ServerInterceptor.invoke(ServerInterceptor.java:25)
               at org.jboss.portal.server.invocation.Invocation.invokeNext(Invocation.java:115)
               at org.jboss.portal.server.aspects.server.SessionInvalidatorInterceptor.invoke(SessionInvalidatorInterceptor.java:74)
               at org.jboss.portal.server.ServerInterceptor.invoke(ServerInterceptor.java:25)
               at org.jboss.portal.server.invocation.Invocation.invokeNext(Invocation.java:115)
               at org.jboss.portal.core.aspects.server.TransactionInterceptor.invoke(TransactionInterceptor.java:62)
               at org.jboss.portal.server.ServerInterceptor.invoke(ServerInterceptor.java:25)
               at org.jboss.portal.server.invocation.Invocation.invokeNext(Invocation.java:115)
               at org.jboss.portal.server.invocation.Invocation.invoke(Invocation.java:150)
               at org.jboss.portal.server.servlet.PortalServlet.doGet(PortalServlet.java:208)
               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:81)
               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.CustomPrincipalValve.invoke(CustomPrincipalValve.java:39)
               at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:159)
               at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:407)
               at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:59)
               at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
               at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
               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:856)
               at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:744)
               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:595)
              2005-11-15 16:58:19,613 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost].[/mbsPortalTheme].[jsp]] Servlet.service() for servlet jsp threw exception
              java.lang.ClassCastException: org.jboss.portal.theme.page.PageResponse
               at org.jboss.portal.theme.tag.HeaderContentTagHandler.doTag(HeaderContentTagHandler.java:33)
               at org.apache.jsp.mbsGeneric.index_jsp._jspx_meth_p_headerContent_0(org.apache.jsp.mbsGeneric.index_jsp:122)
               at org.apache.jsp.mbsGeneric.index_jsp._jspService(org.apache.jsp.mbsGeneric.index_jsp:57)
               at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
               at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
               at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:322)
               at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
               at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
               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.portal.theme.LayoutDispatcher.execute(LayoutDispatcher.java:95)
               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:585)
               at org.jboss.portal.server.servlet.CommandFilter.doFilter(CommandFilter.java:54)
               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.ApplicationDispatcher.invoke(ApplicationDispatcher.java:672)
               at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:574)
               at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:499)
               at org.jboss.portal.theme.LayoutDispatcher.include(LayoutDispatcher.java:130)
               at org.jboss.portal.core.command.RenderPageCommand.renderMarkup(RenderPageCommand.java:149)
               at org.jboss.portal.core.command.RenderPageCommand.renderPortlets(RenderPageCommand.java:281)
               at org.jboss.portal.core.command.RenderPageCommand.execute(RenderPageCommand.java:135)
               at org.jboss.portal.core.command.ControllerCommand.dispatch(ControllerCommand.java:65)
               at org.jboss.portal.server.invocation.Invocation.invokeNext(Invocation.java:125)
               at org.jboss.portal.core.aspects.controller.EventBroadcasterInterceptor.invoke(EventBroadcasterInterceptor.java:72)
               at org.jboss.portal.core.command.CommandInterceptor.invoke(CommandInterceptor.java:25)
               at org.jboss.portal.server.invocation.Invocation.invokeNext(Invocation.java:115)
               at org.jboss.portal.core.aspects.controller.PolicyEnforcementInterceptor.invoke(PolicyEnforcementInterceptor.java:112)
               at org.jboss.portal.core.command.CommandInterceptor.invoke(CommandInterceptor.java:25)
               at org.jboss.portal.server.invocation.Invocation.invokeNext(Invocation.java:115)
               at org.jboss.portal.core.aspects.controller.PortalNodeInterceptor.invoke(PortalNodeInterceptor.java:48)
               at org.jboss.portal.core.command.CommandInterceptor.invoke(CommandInterceptor.java:25)
               at org.jboss.portal.server.invocation.Invocation.invokeNext(Invocation.java:115)
               at org.jboss.portal.core.aspects.controller.NavigationInterceptor.invoke(NavigationInterceptor.java:45)
               at org.jboss.portal.core.command.CommandInterceptor.invoke(CommandInterceptor.java:25)
               at org.jboss.portal.server.invocation.Invocation.invokeNext(Invocation.java:115)
               at org.jboss.portal.server.invocation.Invocation.invoke(Invocation.java:150)
               at org.jboss.portal.core.command.CommandContext.execute(CommandContext.java:94)
               at org.jboss.portal.core.command.ExecutionContext.execute(ExecutionContext.java:80)
               at org.jboss.portal.core.command.ExecutionContext.execute(ExecutionContext.java:64)
               at org.jboss.portal.core.CoreController.handle(CoreController.java:200)
               at sun.reflect.GeneratedMethodAccessor134.invoke(Unknown Source)
               at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
               at java.lang.reflect.Method.invoke(Method.java:585)
               at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
               at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
               at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:118)
               at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
               at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:127)
               at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
               at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:245)
               at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
               at org.jboss.mx.util.JMXInvocationHandler.invoke(JMXInvocationHandler.java:273)
               at $Proxy102.handle(Unknown Source)
               at org.jboss.portal.server.ServerInvocation.dispatch(ServerInvocation.java:63)
               at org.jboss.portal.server.invocation.Invocation.invokeNext(Invocation.java:125)
               at org.jboss.portal.core.aspects.server.PolicyAssociationInterceptor.invoke(PolicyAssociationInterceptor.java:41)
               at org.jboss.portal.server.ServerInterceptor.invoke(ServerInterceptor.java:25)
               at org.jboss.portal.server.invocation.Invocation.invokeNext(Invocation.java:115)
               at org.jboss.portal.server.aspects.server.ContentTypeInterceptor.invoke(ContentTypeInterceptor.java:55)
               at org.jboss.portal.server.ServerInterceptor.invoke(ServerInterceptor.java:25)
               at org.jboss.portal.server.invocation.Invocation.invokeNext(Invocation.java:115)
               at org.jboss.portal.core.aspects.server.LocaleInterceptor.invoke(LocaleInterceptor.java:58)
               at org.jboss.portal.server.ServerInterceptor.invoke(ServerInterceptor.java:25)
               at org.jboss.portal.server.invocation.Invocation.invokeNext(Invocation.java:115)
               at org.jboss.portal.core.aspects.server.UserInterceptor.invoke(UserInterceptor.java:162)
               at org.jboss.portal.server.ServerInterceptor.invoke(ServerInterceptor.java:25)
               at org.jboss.portal.server.invocation.Invocation.invokeNext(Invocation.java:115)
               at org.jboss.portal.server.aspects.server.SessionInvalidatorInterceptor.invoke(SessionInvalidatorInterceptor.java:74)
               at org.jboss.portal.server.ServerInterceptor.invoke(ServerInterceptor.java:25)
               at org.jboss.portal.server.invocation.Invocation.invokeNext(Invocation.java:115)
               at org.jboss.portal.core.aspects.server.TransactionInterceptor.invoke(TransactionInterceptor.java:62)
               at org.jboss.portal.server.ServerInterceptor.invoke(ServerInterceptor.java:25)
               at org.jboss.portal.server.invocation.Invocation.invokeNext(Invocation.java:115)
               at org.jboss.portal.server.invocation.Invocation.invoke(Invocation.java:150)
               at org.jboss.portal.server.servlet.PortalServlet.doGet(PortalServlet.java:208)
               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:81)
               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.CustomPrincipalValve.invoke(CustomPrincipalValve.java:39)
               at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:159)
               at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:407)
               at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:59)
               at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
               at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
               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:856)
               at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:744)
               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:595)


              • 4. Re: JBoss Portal 2.2 CVS-HEAD, Layouts
                Woodler Expert

                could you also post the portal-layouts.xml and your layout jsp ?

                (I just tested my external test app with CVS HEAD and it all worked as expected...)

                • 5. Re: JBoss Portal 2.2 CVS-HEAD, Layouts
                  Keith Davis Newbie

                  As you requested...

                  portal-layouts.xml:

                  <?xml version="1.0" encoding="UTF-8"?>
                  <layouts>
                   <layout>
                   <name>mbsGeneric</name>
                   <uri>/layouts/mbsGeneric/index.jsp</uri>
                   <uri state="maximized">/layouts/mbsGeneric/maximized.jsp</uri>
                   <regions>
                   <region name="left"/>
                   <region name="center"/>
                   </regions>
                   </layout>
                  </layouts>
                  


                  index.jsp:
                  <%@ taglib uri="/WEB-INF/theme/portal-layout.tld" prefix="p" %>
                  <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
                  <html xmlns="http://www.w3.org/1999/xhtml">
                  <head>
                  <title>JBoss Portal 2.2 alpha</title>
                  <meta http-equiv="Content-Type" content="text/html;" />
                   <!-- to correct the unsightly Flash of Unstyled Content. -->
                   <script type="text/javascript"></script>
                   <!-- insert header content that was possibly set by portlets on the page -->
                   <p:headerContent />
                   <!-- inject the theme; default to the MBSDefault theme if nothing is selected for the portal or the page -->
                   <p:theme themeName='mbsDefault' />
                  </head>
                  <body id="body">
                  <div id="portal-container">
                   <div id="sizer">
                   <div id="expander">
                   <div id="logoName"></div>
                   <table border="0" cellpadding="0" cellspacing="0" id="header-container">
                   <tr>
                   <td align="center" valign="top" id="header">
                   <p:region regionName='navigation' regionID='navigation'/>
                   <div id="spacer"></div>
                   </td>
                   </tr>
                   </table>
                   <div id="content-container">
                   <!-- insert the content of the 'left' region of the page, and assign the css selector id 'regionA' -->
                   <p:region regionName='left' regionID='regionA'/>
                   <!-- insert the content of the 'center' region of the page, and assign the css selector id 'regionB' -->
                   <p:region regionName='center' regionID='regionB'/>
                   <hr class="cleaner" />
                   <div id="footer-container" class="portal-copyright">Powered by <a class="portal-copyright" href="http://www.jboss.com/products/jbossportal">JBoss Portal</a><br/>
                   Theme by <a class="portal-copyright" href="http://www.novell.com">Novell</a>
                   </div>
                   </div>
                   </div>
                   </div>
                  </div>
                  </body>
                  </html>
                  


                  maximized.jsp:
                  <%@ taglib uri="/WEB-INF/theme/portal-layout.tld" prefix="p" %>
                  <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
                  <html xmlns="http://www.w3.org/1999/xhtml">
                  <head>
                   <title>JBoss Portal 2.2 alpha</title>
                  <meta http-equiv="Content-Type" content="text/html;" />
                   <!-- to correct the unsightly Flash of Unstyled Content. -->
                   <script type="text/javascript"></script>
                   <!-- inject header content that was generated by the portlets on the requested page -->
                   <p:headerContent />
                   <!-- use the MBSDefault theme if nothing else was defined for the portal or the page -->
                   <p:theme themeName='mbsDefault' />
                  </head>
                  <body id="body">
                  <div id="portal-container"><div id="sizer"><div id="expander">
                   <div id="logoName"></div>
                   <table border="0" cellpadding="0" cellspacing="0" id="header-container">
                   <tr>
                   <td align="center" valign="top" id="header">
                   <p:region regionName='navigation' regionID='navigation'/>
                   <div id="spacer"></div>
                   </td>
                   </tr>
                   </table>
                   <div id="content-container">
                   <!-- Note: this construct assumes that the 'maximizedRegion' layout strategy was chosen for the layout, page or portal -->
                   <!-- the 'maximizedRegion' strategy assigns the maximized portlet to the 'maximized' region -->
                   <p:region regionName='maximized' regionID='regionMaximized'/>
                   <hr class="cleaner" />
                   <div id="footer-container" class="portal-copyright">Powered by
                   <a class="portal-copyright" href="http://www.jboss.com/products/jbossportal">JBoss Portal</a><br>
                   Theme by <a class="portal-copyright" href="http://www.novell.com">Novell</a>
                   </div>
                   </div>
                  
                  </div></div></div>
                  </body>
                  </html>
                  


                  The theme referenced in the JSPs exists in the WAR and functions as expected .

                  -Keith

                  • 6. Re: JBoss Portal 2.2 CVS-HEAD, Layouts
                    Woodler Expert

                    I just took your layout jsp and deployed it in a separate app (war part of an ear) and picked it as layout in my portal, and all is well.

                    In other words: your jsp is fine.

                    There must be a packaging issue. Are you packaging any of the portal jars with your archive ? You don't have to. You only need those for compilation, not for runtime!

                    • 7. Re: JBoss Portal 2.2 CVS-HEAD, Layouts
                      Keith Davis Newbie

                      Thanks for the response, I do have the jar for the taglib in the WAR. I'll remove it and try it again. I hate to ask this, but do you have an example layout war that works with 2.2 that I could look at?

                      Again thanks for the help, it is appreciated!

                      -Keith

                      • 8. Re: JBoss Portal 2.2 CVS-HEAD, Layouts
                        Woodler Expert

                        np, just tell me where to send it (I won't be back until next Monday though ...)

                        • 10. Re: JBoss Portal 2.2 CVS-HEAD, Layouts
                          Woodler Expert

                          sent on it's way

                          • 11. Re: JBoss Portal 2.2 CVS-HEAD, Layouts
                            Keith Davis Newbie

                            Thanks! I'll take a look this afternoon...

                            • 12. Re: JBoss Portal 2.2 CVS-HEAD, Layouts
                              stathisg Newbie

                              Would it be possible to share here the directory structure of a layout war file? Something along the lines of:

                              myLayout.war
                              |--layouts
                              | `-myLayoutFolder
                              | `-index.jsp
                              | `-maximized.jsp
                              `-WEB-INF
                               `-portal-layouts.xml
                               `-web.xml (?)


                              Does the war file need to be inside an ear file? Is there a web.xml file that needs to be defined as well and if so, what goes in it..etc. I know the documentation for 2.2 is still being worked on, so if anyone has some answers to those kinds of questions, it will help a lot while we wait for the 2.2 docs to be finished.

                              Same questions apply to deployable theme war files.

                              Thank you in advance for your time.

                              PS: if I come up with the answers before anyone posts, I'll post them myself of course.

                              • 13. Re: JBoss Portal 2.2 CVS-HEAD, Layouts
                                Woodler Expert

                                Layouts and Themes are (currently) being deployed as part of a war file (which can optionally be contained in an ear).
                                I said currently because we are looking into getting themes to be deployable via Content Management for JBP 2.4.

                                A layout consists of one or more JSP or Servlets , and a layout descriptor. These jsps and servlets underly the same restrictions as any other jsp or servlet in a war file. The layout descriptor defines the uri (relative to the local servlet context) of the jsp or servlet that the portal's request dispatcher can use to include the jsp or servlet.

                                The layout descriptor has to reside in the /WEB-INF/ folder , and has to be named portal-layouts.xml

                                Themes are even simpler. Since themes consist of nothing but static resources (css, img, jpeg, etc.) , all that is needed is a theme descriptor that tells the portal what link and script tags need to be injected for the particular theme.
                                The theme descriptor needs to reside in /WEB-INF/ and needs to be named portal-layouts.xml . Theme resources are declared, again just like layout jsps and servlets, relative to the containing servlet context.

                                here is an example layout war layout :) :

                                /root
                                 /jsp
                                 /layout.jsp
                                 /WEB-INF
                                 /web.xml
                                 /portal-layouts.xml
                                
                                


                                and here is the content of the desriptor:

                                <?xml version="1.0" encoding="UTF-8"?>
                                <layouts>
                                 <layout>
                                 <name>foo</name>
                                 <uri>/jsp/layout.jsp</uri>
                                 <regions>
                                 <region name="left"/>
                                 <region name="center"/>
                                 </regions>
                                 </layout>
                                </layouts>
                                


                                Note: the layout does not need the web.xml, but to form a valid WAR you need to pack one.

                                here is an example theme war :

                                /root
                                 /themeFoo
                                 /img
                                 /lots-of-images-here.jpg
                                 theme.css
                                 /WEB-INF
                                 /web.xml
                                 /portal-themes.xml
                                


                                and here is the content of the desriptor:

                                <?xml version="1.0" encoding="UTF-8"?>
                                <themes>
                                 <theme>
                                 <name>foo</name>
                                 <link rel="stylesheet" id="main_css" href="/themeFoo/theme.css" type="text/css" />
                                 <link rel="shortcut icon" href="/themeFoo/img/favicon.ico" />
                                 </theme>
                                </themes>
                                


                                Note: you can pack as many themes and layouts into the same war, as long as you give them a unique name in the scope of the war. Yes, you can mix themes and layouts in the same war.