Add a portlet to Liferay 5 (deployed in Liferay's Portlet Container)

In this post i will discribe the manual deployment of portlets in WebSphere.
To get some information about the auto deployment of portlets in WebSphere, check out this post.
Manually installation of a portlet in liferays portlet container isnt an easy think but its doable.
I try to explain the procedure with an simple (self created) sample (non-struts) JSP-Portlet.

The portlet just prints out:
Hello - username - how are you?
Download it here

Steps:
1. Copy the JSP-Files of the portlet to "liferay_folder"/html/portlet/welcome/
("welcome" is the portlet name)
2. Add an <portlet>-entry to WEB-INF/portlet-custom.xml
<portlet>
<portlet-name>welcome</portlet-name>
<display-name>Welcome to Liferay 5</display-name>
<portlet-class>com.liferay.portlet.JSPPortlet</portlet-class>
<init-param>
<name>view-jsp</name>
<value>/portlet/welcome/view.jsp</value>
</init-param>
<expiration-cache>0</expiration-cache>
<supports>
<mime-type>text/html</mime-type>
</supports>
<resource-bundle>com.liferay.portlet.StrutsResourceBundle</resource-bundle>
<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>

3. Add an entry to WEB-INF/liferay-portlet.xml
<portlet>
<portlet-name>welcome</portlet-name>
<struts-path>mnet_welcome</struts-path>
<restore-current-view>false</restore-current-view>
<private-request-attributes>false</private-request-attributes>
<ajaxable>false</ajaxable>
</portlet>

4. Add an entry to WEB-INF/liferay-display.xml
<category name="category.ownportlets">
<portlet id="welcome" />
</category>

5. Add an entry to the language-xx.property-files (located in WEB-INF/lib/portal-impl.jar)
5.1 Open portal-impl.jar//content/language-"your needed region codes".properties (Hint: use Winrar)
5.2 Add an entry for the portlet title
javax.portlet.title.welcome=Welcome
5.3 Add an entry fot the category name
category.ownportlets=Own portlets
5.4 Save portal-impl.jar

6. Restart server

7. After the restart it's possible to add the welcome-portlet via the "Add Application" menu

If you want to deploy a struts portlet you have to additionally edit the struts-config.xml and the tiles-def.xml.

If you downloaded a portlet form liferay.com its a bit easier.
Open the downloaded war-file and take a look at the delivered xml-files.
These files just contain the additional entries needed for this portlet.
Copy these entries and paste them in the xmls located in your liferay installation.
Also extract all resources (classes,jars, jsps) to the corresponding folder.
Restart the server and thats it.
Picture (maybe it helps :-) :

Alternative:
Use an ext-enviroment and choose websphere as app-server

Links:
http://wiki.liferay.com/index.php/How_to_create_a_simple_portlet