Hi, I stumbled across this problem, too. I was using LR 5.2.3 with Tomcat 6 bundled and Wicket 1.4.3.
After several unsuccessful tries to get the wicket examples running, I tried to get a simple wicket portlet running. After several frustrating days, I got it running. Here's what I did: 1) Mime types Liferay apparently does not support wildcards in portlet.xml for the //supports/mime-type element. Instead of <supports> <mime-type>*/*</mime-type> <portlet-mode>VIEW</portlet-mode> </supports> I had to use: <supports> <mime-type>text/html</mime-type> <portlet-mode>VIEW</portlet-mode> </supports> For AJAX/resource requests, another supports element for mime-type "text/xml" is needed. 2) Name congruence in deployment descriptors The name in the pattern under //filter-mapping/url-pattern in web.xml (e.g. "/testPortlet/*") has to match with the value under //portlet/portlet-name in portlet.xml, otherwise the portlet will not be rendered, or you get StackOverflowExceptions in LR. //portlet/init-param[name='wicketFilterPath']/value has to be adapted accordingly, e.g. "/testPortlet". Otherwise the portal shows a message "The requested resource (/hellowicket-portlet-1.0-SNAPSHOT/testPortlet/) is not available." instead of the actual portlet content. (The entry in liferay-display.xml should be adapted, too, otherwise the portlet will be listed under the category "Undefined" in the application chooser.) 3) Activate portlet mode for Wicket I used the web.xml method to tell wicket to run in portlet mode. In web.xml of my wicket portlet, I added: <context-param> <param-name>org.apache.wicket.detectPortletContext</param-name> <param-value>true</param-value> </context-param> Otherwise, I got an java.lang.IllegalArgumentException: URL path must start with a '/' or include '://' 4) FORWARD dispatcher in filter mapping An additional FORWARD dispatching in the servlet-filter for the wicket portlet is indispensable, otherwise you get StackOverflow exceptions: <filter-mapping> <filter-name>wicket.testPortlet</filter-name> <url-pattern>/testPortlet/*</url-pattern> <dispatcher>REQUEST</dispatcher> <dispatcher>FORWARD</dispatcher> <!-- important --> <dispatcher>INCLUDE</dispatcher> </filter-mapping> 5) Spring In web.xml of my wicket portlet, another context-param is needed so that Spring can find the context configuration for the WebApplicationContext of wicket: <context-param> <param-name>contextConfigLocation</param-name> <param-value>classpath*:applicationContext.xml</param-name> </context-param> Also needed there: <listener> <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class> </listener> Otherwise, I got the following message during deployment of the wicket portlet: FATAL: Error filterStart Hope this helps. Cheers, Andreas -- Andreas Thiel Principal Consultant mailto:andreas.th...@valtech.de Mobile: +49 172 8982687 Valtech GmbH Bahnstraße 16 40212 Düsseldorf Germany Phone: +49 211 179237-0 Fax: +49 211 179237-19 http://www.valtech.de Geschäftsführer: Ingo Kriescher Amtsgericht Düsseldorf HRB48672 -----Ursprüngliche Nachricht----- Von: Klaus Astner [mailto:klaus.ast...@ec3.at] Gesendet: Mittwoch, 13. Januar 2010 09:40 An: users@wicket.apache.org Betreff: Wicket Portlets and Liferay Hi, We want to use Wicket Portlets in Liferay. The first step would be that all the wicket-example stuff is working - including Ajax. Onfortunately it does not work as intended. The versions to be used are: - Liferay-5.2.2 with Tomcat 6 (currently they use 6.0.18) bundled - Apache Wicket 1.4.5 The tests I did so far are: Jetspeed-2 with Tomcat 6.0.18 and wicket 1.4.5 - everything is working Liferay-5.2.2 with Jetty bundled, wicket-1.4.5 - everything is working Liferay-5.2.2 with Tomcat bundled, wicket-1.4.5 - nothing is displayed Liferay-5.2.2 with Tomcat bundled, wicket-1.4-rc2: porlets working, ajax stuff not Liferay-5.2.2 with Tomcat bundled, wicket 1.4.5 but portlet.xml removed: methods work (incl. Ajax), but as it is unusable (no portlets). Any experience? Klaus --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org