7 Replies Latest reply on Apr 11, 2005 1:05 PM by sdhaliwal

    Struts on Portal Server made possible

    timothybraun

      I have been searching for a portlet compatible implementation of struts for days. There are none that I found that were not portal server specific. I did find one of interest though. It is the Struts Bridge Framework available for JetSpeed-2 from apache/jakarta. Upon reading the documentation, I noticed that you can use it on any portal server as long as you implement a single interface for returning the servlet context. Well, long story short, I implemented the interface and made the necessary changes to jboss portal server 2.0a src. I had to add metheds for retrieving the ServletContext, HttpServletResponse, and HttpServletRequest from PortletContextImpl, PortletResponseImpl, and PortletRequestImpl. I will make patches and source available to anybody who wants them.

      Please note, the code is simple, but it has not been fully tested yet.

      You can check out the bridges website at http://portals.apache.org/jetspeed-2/multiproject/portals-bridges-struts/index.html

        • 1. Re: Struts on Portal Server made possible
          sdhaliwal

          Hi Tim,
          We are desperately trying to make out Struts application work on JBossportal 2.0 beta. Can you please advise us how to get the patch from you. You help will be greately appreciated.

          Regards
          --
          Swarn S. Dhaliwal, Ph. D

          • 2. Re: Struts on Portal Server made possible

            Timothy, please email me what you have, and preferably with some brief notes on what you changed. We're all eager to see it.

            We have been looking at struts bridge for a while now, but my concern is that it doesn't break compliance with the spec.

            • 3. Re: Struts on Portal Server made possible
              jarob3

              Timothy,
              Great work. Can you also send me the patch with instructions? Thanks

              • 4. Re: Struts on Portal Server made possible
                sdhaliwal

                We have the struts-bridge working with jboss-portal-2.0-beta1. Our implementation required adding jboss-portal specific extension to the bridge. The bridge seems to assume an implementation that is specific to the way Jetspeed-2 implements it. Since jboss-portal implements some of the things differently, making the struts-bridge work with jboss-portal requires non-trivial implementation. We will send our implementation to jboss-portal folks for their review.

                • 5. Re: Struts on Portal Server made possible

                  thanks, send it to us (julien and roy) so we can look at it.

                  I looked at the bridge release in M2 version of JS2 and it seemed we only had to implement an interface that gives the http request in function of the portlet request.

                  package org.apache.portals.bridges.common;
                  
                  public interface ServletContextProvider
                  {
                   ServletContext getServletContext(GenericPortlet portlet);
                   HttpServletRequest getHttpServletRequest(GenericPortlet portlet, PortletRequest request);
                   HttpServletResponse getHttpServletResponse(GenericPortlet portlet, PortletResponse response);
                  }
                  


                  Is it what you worked with ?

                  • 6. Re: Struts on Portal Server made possible

                    I am interested in seeing this as well. Please forward when you have a chance.

                    • 7. Re: Struts on Portal Server made possible
                      sdhaliwal

                      I sent the implementation to both Julien and Roy. Hope you guys got it