Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3

...

You will have to check if your portal provides support for these kind of RenderURLs which allows direct access to a
portlet and full control over its response (like setting content type etc.). A ResourceURL will be is a standard JSR-286 (Portlet API 2.0) feature but as it isn't yet released (Oct'07 - it will be soon) for which I created this temporary interface to allow using it in a JSR-186 168 container as well, as long as a portal provides a propetairy proprietary mapping for it.

Jetspeed 2 does, and AFAIK, most other portals do as well, you just need to find out how to map this for Liferay and provide
(or use) their proprietary api to handle it.

...

That I know Liferay already provides as I know it provides support for the Apache Portals Struts Bridge which uses the same
interface.

Note: this interface also is provided with the portal-bridges-common-1.0.3.jar (and earlier).

BTW: this inteface also won't be needed anymore for proper JSR-286 containers. Once they are available I'll upgrade the Wicket
Portlet support to really work out-of-the-box and portal specific configurations won't be needed then.

...

As you will notice of the example above, I also defined support for all possible mime-types (<mime-type>/</mime-type>), to support ResourceURLs setting any mime-type they might need. This is just to ensure the portal/container isn't going to complain if your ResourceURL handling is going to set an unexpected mime-type. If you happen to know all possible mime-types before hand you also can enumerate each of them, instead of simply allowing everything.

Note: the wicket filter path must be also specified with the "filterMappingUrlPattern" parameter in web.xml (this time with the trailing /*):

Code Block
xml
xml

   <filter>
      ...
      <init-param>
         <param-name>filterMappingUrlPattern</param-name>
         <param-value>/ajax/*</param-value>
      </init-param>
      ...
   </filter>

That should be all you need to do to get started.
Please let us know if you encounter any problems and also if you get working just fine of course (smile)

...

Code Block
xml
xml
<servlet>
    <description>MVC Servlet for Jetspeed Portlet Applications</description>
    <display-name>Jetspeed Container</display-name>
    <servlet-name>JetspeedContainer</servlet-name>
    <servlet-class>org.apache.jetspeed.container.JetspeedContainerServlet</servlet-class>
    <init-param>
      <param-name>contextName</param-name>
      <param-value>WicketPresentation</param-value>
    </init-param>
    <load-on-startup>0</load-on-startup>
</servlet>
<servlet-mapping>
    <servlet-name>JetspeedContainer</servlet-name>
    <url-pattern>/container/*</url-pattern>
</servlet-mapping>

You don't need to add the above changes manually in your web.xml: Jetspeed can do that automatically for you if you "drop" your war file in the "hot" WEB-INF/deploy folder of the portal application.
For more information, check out: http://portals.apache.org/jetspeed-2/multiproject/jetspeed-deploy-tools/index.html, first paragraph, Deploying Portlets in Jetspeed-2: An End User View, explains it all.