3 Replies Latest reply on Jan 15, 2010 12:52 PM by pathuri

    Problem with Portlet Container

      Hi jboss protlet container contributors :)

      I want to make a lightweight portal for my company intranet. so I was thingking of using JBoss Portlet Container as a base.

      I don't want to use current JBoss portal because it has to be deploy on top of JBoss AS which I think is too heavy weight ... because I don't want to use its EJB or MDB or Seam or JMS or all those unnecessary things (I compare this to other portal like jetspeed and others that only need simple servlet container such as Tomcat)

      So I decided to try my luck on building it from JBoss Portlet Container. I managed to run simple-portal (bundled with JBoss portlet container download file), I even managed to create my custom page based on that ...

      But when I use Spring ... it seems that portal tag was not rendered the right way ... this is my web.xml:
      ------------------------------------------------------------------------------------
      WEB.XML:

      <welcome-file-list>
      <welcome-file>index.jsp</welcome-file>
      </welcome-file-list>

      <!-- FILTERS BY JBOSS PORTLET CONTAINER -->

      <filter-name>ErrorHandlingFilter</filter-name>
      <filter-class>org.jboss.portal.portlet.portal.ErrorHandlingFilter</filter-class>


      <filter-name>ControllerFilter</filter-name>
      <filter-class>org.jboss.portal.portlet.portal.jsp.ControllerFilter</filter-class>

      <filter-mapping>
      <filter-name>ErrorHandlingFilter</filter-name>
      <url-pattern>*.jsp</url-pattern>
      </filter-mapping>
      <filter-mapping>
      <filter-name>ControllerFilter</filter-name>
      <url-pattern>*.jsp</url-pattern>
      </filter-mapping>

      <!-- LISTENER BY JBOSS CONTAINER -->

      <listener-class>org.jboss.portal.common.mc.bootstrap.WebBootstrap</listener-class>


      <!-- SERVLETS BY JBOSS CONTAINER -->

      <servlet-name>ContainerServlet</servlet-name>
      <servlet-class>org.jboss.portal.web.impl.tomcat.TC6ContainerServlet</servlet-class>
      <load-on-startup>0</load-on-startup>


      <!-- SPRING -->

      <servlet-name>webos</servlet-name>
      <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
      <load-on-startup>1</load-on-startup>

      <servlet-mapping>
      <servlet-name>webos</servlet-name>
      <url-pattern>*.htm</url-pattern>
      </servlet-mapping>
      ---------------------------------------------------------------------------------

      SPRINT-BEAN.XML:

      <!-- View Resolver -->













      ----------------------------------------------------------------------------------

      When I open my first page which is a login page that managed by Spring controller ... everything is fine ... but after I click on submit button, and spring controller try to open a page that contains PORTLET, it throws this error:

      SEVERE: Servlet.service() for servlet webos threw exception
      java.lang.ClassCastException: org.apache.catalina.connector.ResponseFacade cannot be cast to org.jboss.portal.portlet.portal.jsp.PortalResponse
      at org.jboss.portal.portlet.portal.jsp.taglib.PortalBodyTagSupport.getPortalResponse(Unknown Source)
      at org.jboss.portal.portlet.portal.jsp.taglib.PortalBodyTagSupport.doStartTag(Unknown Source)
      at org.apache.jsp.WEB_002dINF.jsp.test_jsp._jspx_meth_portal_005fpage_005f0(test_jsp.java:94)
      at org.apache.jsp.WEB_002dINF.jsp.test_jsp._jspService(test_jsp.java:72)
      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.java:374)
      at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:337)
      at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:630)
      at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:436)
      at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:374)
      at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:302)
      at org.springframework.web.servlet.view.InternalResourceView.renderMergedOutputModel(InternalResourceView.java:240)
      at org.springframework.web.servlet.view.AbstractView.render(AbstractView.java:252)
      at org.springframework.web.servlet.DispatcherServlet.render(DispatcherServlet.java:1173)
      at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:901)
      at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:809)
      at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:571)
      at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:511)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
      at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
      at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
      at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
      at java.lang.Thread.run(Unknown Source)

      It seems that spring request on the portlet contained page was failed to
      parse <portal:page> tag ... maybe this is because some how spring cannot trigger JBpss portlet framework or what ever.

      Please give me some ways to work arround this.

      Thankyou all in advanced

      Best regards
      Bromo