PDA

View Full Version : How deploy spring portlet in Liferay Portal


cghanassia
Oct 10th, 2007, 08:05 AM
Hello i have some trouble to deploy a spring portlet in liferay portal 4.3.2 on the Tomcat 6.0.13

I try the steps following :

1. I download an exemple of portlet : spring-portlet-sample.zip
2. I extract the war
3. I add :
<listener>
<listener-class>com.liferay.portal.kernel.servlet.PortalContextLis tener</listener-class>
</listener>
In web.xml
4. i add tow files : liferay-portlet.xml and liferay-display.xml
liferay-portlet.xml:
<liferay-portlet-app>
<portlet>
<portlet-name>helloworld</portlet-name>
<portlet-url-class>com.liferay.portlet.PortletURLImplWrapper</portlet-url-class>
</portlet>
....
</liferay-portlet-app>

liferay-display.xml:
<display>
<category name="my.test">
<portlet id="helloworkd"/>
</category>
</display>

4. I deploy the war in folder {tomcat_home}/webapps or {user_home}/liferay/deploy

When my portlet is deployed i have this error inside the portlet :
----------------------------------------------------------------------
Hello World
-----------------------------------------------------------------------
The requested resource (/spring-portlet-sample/helloworld/invoke) is not available.
-----------------------------------------------------------------------

I search very hard but i don't find a solution. I will be very happy if you get the solution.

Best Regards,
Cédric

johnalewis
Oct 10th, 2007, 11:55 AM
You're really asking a Liferay question -- not a Spring question. The Liferay forum is probably a better place for this.

However, at least in your sample, I noticed a typo that would probably cause problems if it really exists in your test code. In your liferay-display.xml file, you have misspelled the portlet id as "helloworkd" instead of "helloworld".

cghanassia
Oct 10th, 2007, 02:40 PM
Thank you for your response, i follow your advice and i try to post on liferay support.
But i type a wrong word (helloworld) in the post but not in my conf.
In fact, the liferay portal find the portlet but can't it display

johnalewis
Oct 10th, 2007, 02:43 PM
I suspect you need some kind of Liferay-specific servlet entry in the web.xml file to which the "/spring-portlet-sample/helloworld/invoke" request can go. Unless the listener you added is handling that for you. But again, this is really a Liferay issue.