Forums de discussion

Portlet not showing in Liferay

Vasanth Jayabalan, modifié il y a 13 années.

Portlet not showing in Liferay

New Member Publications: 24 Date d'inscription: 25/02/11 Publications récentes
Greeting everyone,

I am new to Liferay and portlet development. I create a portlet according to the Liferay manual. I generated a war file and deployed it in tomcat running in a Liferay environment. When I start the server and go to the portal page, I dont see my portlet in the list of available ones. Here are my portlet.xml and liferay-display.xml files:

<portlet>
<portlet-name>vj_portlet1</portlet-name>
<display-name>Vj Portlet1</display-name>
<portlet-class>com.liferay.util.bridges.mvc.MVCPortlet</portlet-class>
<init-param>
<name>view-jsp</name>
<value>/view.jsp</value>
</init-param>
<expiration-cache>-1</expiration-cache>
<supports>
<mime-type>text/html</mime-type>
</supports>
<portlet-info>
<title>Vj Portlet1</title>
<short-title>Vj Portlet1</short-title>
<keywords>Vj Portlet1</keywords>
</portlet-info>
<security-role-ref>
<role-name>administrator</role-name>
</security-role-ref>
<security-role-ref>
<role-name>guest</role-name>
</security-role-ref>
<security-role-ref>
<role-name>power-user</role-name>
</security-role-ref>
<security-role-ref>
<role-name>user</role-name>
</security-role-ref>
</portlet>

****************************************************************************************

<display>
<category name="category.sample">
<portlet id="vj_portlet1" />
</category>
</display>

I was hoping to see the vj_portlet1 portlet under the 'Samples' category in the 'Add' dropdown emoticon. Please let me know what's wrong here. I am using Liferay Portal 6.0.5 and Tomcat 6.0.26.

thanks much!
thumbnail
Ravi Kumar Gupta, modifié il y a 13 années.

RE: Portlet not showing in Liferay

Liferay Legend Publications: 1302 Date d'inscription: 24/06/09 Publications récentes
Hello Vasanth,

Did you check the logs, if it says something like this "1 portlet for Vj Portlet1 is available for use" then your portlet should be available in the category you want.

If logs does not show that, then some error must be there.. please attach the logs so that one can help you.

Thanks and Regards
Ravi Kumar Gupta
TechD of Computer world
thumbnail
Muradali Hasan, modifié il y a 13 années.

RE: Portlet not showing in Liferay

Junior Member Publications: 84 Date d'inscription: 27/07/10 Publications récentes
there are total three xml files in which u need configure ur portlet

the above code u mention is liferay-display.xml and portlet.xml
have u checked for liferay-portlet.xml

u need to create three files
names
1.liferay-display.xml
2.liferay-portlet.xml
3.portlet.xml
Vasanth Jayabalan, modifié il y a 13 années.

RE: Portlet not showing in Liferay

New Member Publications: 24 Date d'inscription: 25/02/11 Publications récentes
Thanks Muradali and Ravi for your replies. I figured the issue was with a JSP file. I fixed it and redeployed the war and it worked fine. However I have another question. I had to manually copy the war file into the webapps directory of tomcat inside the liferay bundle.

I am using STS (SpringSource Tool Suite) with the Liferay IDE plugin for development. I am not able to publish my portal project to the Liferay server from within the STS IDE. The server version is 6.0.5 and the plugins-sdk version is also 6.0.5.

Do you know if the Liferay IDE Plugin has been proven and tested for STS? Or am I doing something wrong here?

thanks,
Vasanth
Vasanth Jayabalan, modifié il y a 13 années.

RE: Portlet not showing in Liferay

New Member Publications: 24 Date d'inscription: 25/02/11 Publications récentes
I figured using NetBeans is much better than STS. NetBeans supports JSR168/286 compliant portlets, making it easier to implement inter-portlet communication. It also integrates well with the Liferay portal server. I will keep you posted on my findings emoticon

thanks,
Vasanth