Tuesday, November 26, 2013

Liferay

Liferay Hook development
http://learntolead-liferay.blogspot.co.uk/2012/07/liferay-hook-4-custom-action-prelogin.html

IBM TAM SSO with Liferay
http://www.khau-tech.com/2012/11/19/ibm-tivoli-access-manager-sso-with-liferay/


Which Action class to use to extend the action behaviour
*************************************************
https://www.liferay.com/community/wiki/-/wiki/Main/Struts+Action+Hook+Tips?_36_pageResourcePrimKey=21386817

SPRING MVC Liferay Portlet
--------------------------------------------
http://www.opensource-techblog.com/2012/09/spring-mvc-portlet-in-liferay.html

Thursday, November 14, 2013

Some handy Unix/Linux commands

To find a process with specific string and then kill a series of such processes.
-------------------------------------
kill -9 `ps -ef | grep <string> | grep -v grep | awk '{print $2}'`


Make a file void / empty
------------------------------------
cat /dev/null > abc.txt


Super duper command to remove cache/page cache from Linux
---------------------------------------------------------------------------------------
free && sync && echo 3 > /proc/sys/vm/drop_caches && free

More on this refer...
http://unix.stackexchange.com/questions/87908/how-do-you-empty-the-buffers-and-cache-on-a-linux-system


 

Tuesday, November 05, 2013

Liferay 6.2 - Installations - LDAP integration

Liferay 6.2 - LDAP Integration
*****************************

Liferay 6.2 has no properties files ! Which were there until previous version. I guess now these are part of database tables.

So, while I was trying to integrate my server with LDAP server (TDS) I could configure the LDAP using the Control panel of liferay. And server was able to connect to LDAP.

But due to some issue I was not able to login using any of my ldap users or the default portal user. I was not able to login to the portal.

In earlier version there was a property file named, portal-ext.properties which used to hold those ldap specific values. But this doesnt exist in Liferay 6.2.

While looking at database ( portal database ), I found a table named portalpreferences, which has those ldap properties.

SELECT preferences FROM lportal.portalpreferences where portalPreferencesId = 10160


So, I changed the values of the parameters,
ldap.auth.enabled and ldap.auth.enabled ( which are two check boxes on the LDAP configuration page needs to be checked to enable LDAP login ) to false.

And that's it.

It worked for me, hope it helps you. This is still work under progress and I am looking to complete this LDAP connectivity with Liferay 6.2. So will keep updating this post.

https://www.liferay.com/documentation/liferay-portal/6.2/user-guide/-/ai/integrating-existing-users-into-liferay-liferay-portal-6-2-user-guide-17-en



Thursday, October 10, 2013

WebSphere Portal - Authoring Template - Ephox error IWKAP0009E: Servlet not enabled.

We upgraded our portal server to use the latest Ephox editor because the old version was giving logs of Java Security errors.

We applied the fix pack (? - will add exact number later ! ).

And restarted the server but was getting strange error while clicking on "New" button in WCM. On click it will show "IWKAP0009E: Servlet not enabled."

After googling came across this article which is exactly the problem we had and it we resolved following it...

http://www-01.ibm.com/support/docview.wss?uid=swg21445801

Another tech note which also suggests to do the same thing...

https://www.ibm.com/developerworks/mydeveloperworks/blogs/WCML2Thoughts/?lang=en

Tuesday, September 24, 2013

What is difference between SSL & SSH - SSL & TSL

Good explanation 
http://yet.another.linux-nerd.com/blog/difference-between-ssh-and-ssl

A bit of discussion
http://stackoverflow.com/questions/723152/difference-between-ssh-and-ssl

Some more such acronyms...
http://www.rebex.net/kb/secure-ftp/default.aspx


Good information on SSL Vs TSL ( Very interesting to understand Poodle vulnerability ! )
https://luxsci.com/blog/ssl-versus-tls-whats-the-difference.html


http://www.sans.org/reading-room/whitepapers/protocols/ssl-tls-beginners-guide-1029

SSL - Mutual Authentication
-------------------------------------------
http://www.codeproject.com/Articles/326574/An-Introduction-to-Mutual-SSL-Authentication

Saturday, September 21, 2013

Aggregation Vs Composition - OOD Concept

I have a very basic example to understand aggregation / composition.

And over a time, thinking about from somewhere I have found a very profound example to explain both concept.

Composition - A composition in which objects forms an entity and that entity cant remain complete if one of the object is removed.

Example : To understand composition, think of a medicinal tablet, which might be made of many elements in various proposition but you cant remove one easily and if you remove one it's wont be same tablet / medicine anymore.

Aggregation - A collection of objects which are loosely connected and can be easily replaces / removed and can be used separately and can be modified easily.

Example : There can be many but I think a car is best one ! One can modify anything in car / replace objects. One can change tire / change color, change wipers / even change engines. And still car will work ! And everything is so loosely coupled that it can be changed easily.

Wednesday, September 18, 2013

Websphere Virtual Portal - Modify for Virtual Host Name


http://www-10.lotus.com/ldd/portalwiki.nsf/xpDocViewer.xsp?lookupName=IBM+WebSphere+Portal+7+Product+Documentation#action=openDocument&res_title=Virtual_portals_reference_wp7&content=pdcontent


Using a new host name for an existing virtual portal.

If you want to use a new host name for an existing virtual portal, proceed by the following steps:
Export the contents of the virtual portal by using the XML configuration interface.                                 
/opt/IBM/PortalServer/bin/xmlaccess.sh -in Export.xml -user wpadmin -pwd xxxxx -url http://localhost:<portalPortalNumber>/<yourportalContext>/config/<yourVPContext> -out ExportVP_out.xml
 
Delete the virtual portal.


Clean up references to the deleted virtual portal by using the Task.xml script of the XML configuration interface.

Create a new empty virtual portal by using the configuration task create-virtual-portal. Use the context of the deleted virtual portal, and specify the new host name as required.

Import the contents to the new virtual portal by using the XML configuration interface.

 ----------------------------
  [wsadmin] VirtualPortal:
  [wsadmin] Title:       Institutions
  [wsadmin] Description:
  [wsadmin] Realm:       defaultWIMFileBasedRealm
  [wsadmin] Object ID:   Z18_K99SEH6510KN80IF6GO7973481
  [wsadmin] Hostname:    <cannot be retrieved>
  [wsadmin] Context:     institutions
  [wsadmin] Short ID:    -14001
  [wsadmin] _____________________________________________________






Portal Servlet filter - To filter each incoming request / outgoing response from portal server

Portal Servlet filter - To filter each incoming request / outgoing response from portal server
 **********************************************************************

http://www.ibm.com/developerworks/websphere/library/techarticles/0707_lynn/0707_lynn.html


I used this one to create a portal servlet filter to add a response header on each response.

For a specific issue with JSF components being rendered in IE-10, which rurns the validation on although no validation is attached to the input text boxes, on submit all boxes shows compulsory validation.

//Hardik

Thursday, August 22, 2013

Everything about XMLAccess - Task.xml

http://www-10.lotus.com/ldd/portalwiki.nsf/dx/XMLAccess_Frequently_Asked_Questions#What+is+XMLAccess%3F


There is a /opt/IBM/WebSphere/PortalServer/docs/xml-samples/Task.xml - Use this xml script to do clean up after deleting any component and not allowing to create a new component with the same name.

Websphere Portal - Security - SSO


http://www-10.lotus.com/ldd/portalwiki.nsf/dx/Configuring_%E2%80%98Single_Sign_On%E2%80%99_between_Web_Sphere_Portal_Server_7.0com_Tivoli_Access_Manager_WebSEAL_version_6.1_on_AIX_6.1_?OpenDocument&sa=true#Required+junction+parameters

ftp://ftp.software.ibm.com/pub/info/portal/WebSphere_Portal_Security_overview.pdf

http://www.ibm.com/developerworks/tivoli/library/t-ssotam/

http://www-10.lotus.com/ldd/portalwiki.nsf/dx/Web_security_concepts_and_considerations_for_IBM_WebSphere_Portal_administrators#Sessions

Monday, August 19, 2013

RAD 9.0 Maven Plugin

With RAD 9.0 there are immense improvements in terms of Maven working with RAD for building and deploying portlet based project.

But I found it hard to find a plugin which actually deploys the code to the websphere portal server.

After a lot struggle found the location of the plugin...

https://public.dhe.ibm.com/ibmdl/export/pub/software/websphere/wasdev/maven/repository/com/ibm/tools/plugin/portal-deployment-maven-plugin/1.0/


But somehow cant download so downloaded each file...

maven-metadata.xml
portal-deployment-maven-plugin-1.0.jar
portal-deployment-maven-plugin-1.0.pom

Copied them in a folder named "portal-deployment-maven-plugin" ( this can be anything ! ).

And then copy across that folder into plugin folder where RAD has stored other plugins...

For me it's

C:\IBM\IBMIMShared\plugins

In your project's pom.xml you need to mention this plugin...

     <plugin>
<groupId>com.ibm.tools.plugin</groupId>
<artifactId>portal-deployment-maven-plugin</artifactId>
<version>1.0</version>
<executions>
<execution>
<phase>integration-test</phase>
<configuration>
<username>wpsadmin</username>
<password>wpsadmin</password>
<hostname>localhost</hostname>
<port>10039</port>
</configuration>
<goals>
<goal>deploy-portlet</goal>
</goals>
</execution>
</executions>
</plugin>

After doing all this, restart your RAD.

And that's it.

Go to your project, right click and build. It should build and deploy your portlet to mentioned portal server.

http://pic.dhe.ibm.com/infocenter/radhelp/v9/index.jsp?topic=%2Fcom.ibm.portal.doc%2Ftopics%2Ft_DeployingMavenPortletProjects.html

Hope this helps.

Leave comments if you get stuck.

//HP



Friday, August 16, 2013

Websphere Portal / Websphere Application Server


IBM WAS Administrator scripts sample

http://www.ibm.com/developerworks/websphere/library/samples/SampleScripts.html#download


WAR Export Script...
http://wpcertification.blogspot.co.uk/2010/06/updating-wpsear-using-wsadmin-script.html

WPS Export script...

[root@wput-1 bin]# ./wsadmin.sh -conntype none -host localhost -user wpadmin -password gr\!n.baR1t -port 20033 -lang jython
WASX7357I: By request, this scripting client is not connected to any server process. Certain configuration and application operations will be available in local mode.
WASX7031I: For help, enter: "print Help.help()"
wsadmin>AdminApp.export('PA_MoodleEntryPoint','/tmp/PA_MoodleEntryPoint.ear')
''
wsadmin>AdminApp.export('PA_WCMLRingPortJSR286','/tmp/PA_WCMLRingPortJSR286.ear')
''