Monday Apr 27, 2009

Glassfish Web Space Portal in JES6 Release

JES6 (Java Enterprise System 6) has been released today!!. Please download it from the following location

JES6 contains the GlassFish Web Space Portal 10.0 which is the next generation portal from Sun Microsystems which is based on Open source Liferay community. Following are some of the features provided by Web Space Portal 10.0

Web Aggregation Enhances user experience with efficient views of Web content/application, Using mashups and Ajax based desktop for easy drag and drop
Identity-based content delivery (IDBC) Achieved through opensso addon feature
User generated/managed communities Improves efficiency for ad hoc/informal project teams by providing a Web space that can be tailored to the needs of the project
User/role-based content management An out-of-the-box support for CMS based on JSR 170. Supports Document Management, Image Management, Web Content Management. More info...
Comprehensive collection of integrated collaboration tools Simplifies users' access to collaboration tools like wikis, blogs
Human workflow application development tools and rules engine integration Acheived through Simple api for workflow(SAW). Supports JCAPS workflow Engine and JBPM Engine. More info...
Enterprise 2.0 platform – social graph, wiki, blogs, forums, etc. Improves communication, intellectual property sharing/capturing, and collaboration
Content staging and workflow Controls content publishing by staging page content and assigning content managers
Web site branding

Enables the rapid development and publishing of company-branded Web sites

Leverages the large number of customized themes that have already been produced in the community

Allows Web developers to quickly customize theme/skin by utilizing Web Space Server plugin for Dreamweaver

Presence Feature
more info...
Portlet Container Support
Portlet Container 2.1 is bundled with the Web Space portal. This supports JSR 168 and JSR 286 portlet specifications.
Portlet Development Tools
Developer Tools are also provided for fast and seamless portlet development/deployment over web space server. more info...
ant based installer and very simple to install and deploy

Thursday Feb 19, 2009

SSL install of GlassFish Webspace server 10.0

GlassFish Webspace server 10.0 based on Liferay Portal is Sun's next generation portal. The latest Commercial Release can be downloaded from the following site

SSL install of Webspace server involves two steps :

1. Enabling the SSL on the Glassfish server instance

2. Installing the Webspace server

Enabling the SSL on the Glassfish server instance

  1. Download the RR release of Glassfish from the following location . Install and start the domain
  2. change to directory domains/domain1/config under the Glassfish install directory (cd to <gf_install_dir>/domains/domain1/config
  3. Delete the existing alias s1as from the keystore. Execute : keytool -delete -alias s1as -keystore keystore.jks (keytool will be present under jdk1.6.0_10/bin/ directory. Keystore password by default will be "changeit")
  4. Generate the key request. Execute : keytool -genkey -alias s1as -keyalg RSA -keysize 512 -dname "CN=<hostname-fqdn>,Ou=People,O=Sun,L=Bangalore,S=Karnataka,C=IN" -keystore keystore.jks
    Enter keystore password:  changeit
    Enter key password for <s1as>
            (RETURN if same as keystore password):
  5. Generate certificate signing request. Execute : keytool -certreq -alias s1as -sigalg "MD5withRSA" -file certreq.pem -keypass changeit -keystore keystore.jks -storepass changeit 
  6. cat certreq.pem
  7. Get this certificate signed from the CA. We internally use  openssl install
  8. Now import the rootca of this CA. This can be obtained on Execute : keytool -import -alias rootca -trustcacerts -file rootca.pem -keystore keystore.jks -storepass changeit  (rootca.pem file contains the rootca obtained from
  9. Import the signed certificate from the CA. Execute : keytool -import  -alias s1as -file servercert.pem -keypass changeit -keystore keystore.jks -storepass changeit
  10. Restart the glassfish domain.
  11. Access https://<hostname:8181> and view the certificate. It should show issued by : Veera Natarajan if you have used raasi as the signing CA
  12. Install the Glassfish Webspace 10.0. See the instructions under the section "To Install Webspace Server Software Into an Existing Sun GlassFish Configuration" from the "getting started guide" at the following location

Courtesy : Ajit Kamble, Gang chen and Veera Natarajan

Monday May 19, 2008

Setting up the development environment on liferay latest trunk

Goals :

1. To setup the dev environment of the liferay code on Netbeans 6.1 and Tomcat in debug mode

This is to understand the liferay code for the project websynergy and the flow of the code. 


 Pre-requisites :

1. Install Netbeans 6.1 , ant 1.7, Tomcat 6.x, and svn



Steps : 

1. checkout the latest Liferay trunk with the help of the following command "svn co liferaytrunk"

2. cd to liferaytrunk

3. run "ant"

4. After this, cd to liferaytrunk copy "" to "". Note : siddesh is the login name for my windows xp machine. So it will vary for you depending on your login name

5. Remove everything from "" and add the following. (Note : These properties might change for you depending on where you have installed the apache-tomcat-6.0.16



6. If one starts the tomcat using startup.bat(in windows) or in Solaris, it gives the following exception

Exception in thread "http-8080-Processor25" java.lang.OutOfMemoryError: PermGen space
Exception in thread "DefaultQuartzScheduler_QuartzSchedulerThread" java.lang.OutOfMemoryError: PermGen space
Exception in thread "http-8080-Processor24" java.lang.OutOfMemoryError: PermGen space
Exception in thread "QuartzScheduler_QuartzSchedulerThread" java.lang.OutOfMemoryError: PermGen space
Exception in thread "QuartzScheduler_QuartzScheduler-NON_CLUSTERED_MisfireHandler" java.lang.OutOfMemoryError: PermGen space

7. To solve this, add the following line in catalina.bat(on windows) or solaris) :

JAVA_OPTS="$JAVA_OPTS "-Xmx1024m" "-Xms1024m" "-XX:MaxPermSize=512m""

8. Setting Tomcat to listen in debug mode : (Example of startup.bat is shown)

    cd to apache-tomcat-6.0.16\\bin directory

    Add the following lines in startup.bat script (set JPDA_ADDRESS=8000
set JPDA_TRANSPORT=dt_socket)

Add the following line just before :end (call "%EXECUTABLE%" jpda start %CMD_LINE_ARGS%)

9. Start the netbeans 6.1 and import the liferaytrunk project into the netbeans

10. click on run -> attach debugger

Debugger : JPDA Debugger

Connector : Socket Attach

Host : give localhost or the hostname

Port : 8000

11. Access the liferay http://localhost:8080 This will invoke the debugger in the netbeans 6.1 . One can add break points and checkout the flow of the code.


Sunday May 18, 2008

Configure MYSQL for project websynergy on GlassFish V3 in 60 seconds

Courtesy : Raju uppalapati from the portal team.

Goal : Making websynergy to work with mysql instead of the default hsql database

Pre-requisite :

1. Install WebSynergy

2. Install mysql running on port 3306. Username : root and password :<password>. Create a database "lportal" in it. From the sql command line client, use the command "create database lportal; "



  Accessing websynergy portal :

1. cd to glassfish-synergy/glassfish/bin and run asadmin start-domain

2. Access http://localhost:8585 and login with username:  and password: paul to check whether websynergy is up and running.



 Installing the admin console for the GlassFish V3 :

1. Access http://localhost:8585/admin , Download and install the adminconsole. Login as anonymous. Please go through this blog for more information on installing admin console for Glassfish V3



 Changing the existing jdbc connection pool so that it points to mysql :

1. Follow the following screencast to change the existing jdbc hsql connection pool to point to mysql

2. Restart the domain using "asadmin stop-domain" and "asadmin start-domain" commands

2. Login to websynergy http://localhost:8585. Now it uses mysql to store the user data.



 Also Check Out :

GlassFish Version 3 Community Efforts




HSQL in project websynergy

Goal : To understand the usage of HSQL by project Websynergy

1. Download Websynergy and install it.

2. cd to the glassfish-synergy/glassfish/bin directory and run asadmin start-domain

3. Once the server is started, you will find a lportal.log in glassfish-synergy/glassfish/bin directory

4. This log file contains all the sql statements that are run on the hsql db

5. Now access the websynergy page http://localhost:8585 and login as and password : paul

6. Note the change in the lportal.log. So once paul/paul authenticates, the hsql is updated with paul's information and so is the file lportal.log

Friday May 16, 2008

Creating a custom widget in project websynergy

Courtesy : Thanks to Neel from the Portal team to give me a heads up on this.

Goal : To create a custom widget in the Project websynergy codebase and deploy it in the websynergy portal. Project Websynergy is Sun's next generation portal using Liferay Portal Server, GlassFish v3, and MySQL . I am re-using a JSR 286 portlet which my colleague Sriram has written and can be found here :

Creating a EmployeeInfo Portlet and a Health Portlet which displays the BMI of the person entered in EmployeeInfo Portlet.

Steps to create the widget in websynergy :

 Steps to checkout the websynergy code base :

1. Once the code base is checked out, cd to synergy/widgets directory

2. run ant create . Enter the widget name as "EmployeeInfo" , Enter the widget directory as "EmployeeInfo"

3. The widget directory will have the "EmployeeInfo" directory created which will have src, web and build.xml

4. copy the and under synergy\\widgets\\EmployeeInfo\\src\\java\\com\\sun\\portlet

5. change the package name in and for ex : to "package com.sun.portlet"

6. The EmployeeInfo directory will have "web" directory -> EmployeeInfo-docroot, META-INF and WEB-INF

7. copy the jsp files to WEB-INF/jsp directory

8. add the following lines in the individual jsp files

<%@ taglib uri="" prefix="liferay-portlet" %>
<%@ taglib uri="" prefix="liferay-theme" %>
<%@ taglib uri="" prefix="liferay-ui" %>

9. The purpose of liferay-display.xml and liferay-portlet.xml

a. liferay-portlet.xml is like a wrapper on the portlet.xml. Liferay has added certain extra functionalities and they have used their own dtd (liferay-portlet-app_5_0_0.dtd)

b. The liferay-display.xml has the following items :

<category name="category.sample">
 <portlet id="EmployeeInfo"/>

The category.sample means that when we deploy this portlet and then log in as paul/paul or any other user, then click on "Add application" link, the EmployeeInfo portlet will be displayed under "sample"

10. Add the portlet name in the build.xml in the widgets directory

11. The war file will be created under the directory synergy\\widgets\\EmployeeInfo\\build\\war

12. copy this war file and just paste it under the directory C:\\Documents and Settings\\<username>\\liferay\\deploy

13. Now login to websynergy http://localhost:8585 ( and click on "add applications" . You should find the custom portlets under sample.

Here is how the portlets look on the websynergy :



To checkout the websynergy code base

Project Websynergy is Sun's next generation portal using Liferay Portal Server, GlassFish v3, and MySQL

Steps to checkout the websynergy code base :

1. Download the svn utility from

2. Edit the servers file to add your respective proxy server which is  under the location C:\\Documents and Settings\\<windows user>\\Application Data\\Subversion . A Sample "servers" file is available at the following location. Just replace the tag "<Add your proxy name here>" with your proxy. checkout/servers

3. Note, sometimes the Subversion directory wont be present under C:\\Documents and Settings\\<windows user>\\Application Data until you restart the machine

4. Download and install ant from the location :

5. Download and install JDK 1.6

6. Add a system variable JAVA_HOME = C:\\Program Files\\Java\\jdk1.6.0

7. Add a system variable SVN = C:\\Program Files\\Subversion\\bin\\svn

8. Add the jdk path (C:\\Program Files\\Java\\jdk1.6.0\\bin) to the path variable

9. svn co synergy

10. cd to the synergy directory and run ant

11. Once the ant is successful, cd to the directory synergy\\install\\image\\glassfish\\bin and run asadmin.bat start-domain

12. Wait for 1 or 2 mintues for the jsps to compile and run the websynergy portal by accessing http://localhost:8585  (user : password : paul)





« July 2016