Liferay development With JREBEL & It is FREE for Personel use

General Blogs June 25, 2014 By mohammad azaruddin

 JRebel has changed the way developers code in Java. Never again will you need to redeploy your application to see the impact of code updates. Make changes and JRebel applies them instantly to your running application.
Step 1: Download Jrebel from eclipse marketplace..
              In Eclipse navigate to HELP>>Eclipse MarketPlace And Serach for Jrebel and Install
Step 2:   Get licence key by registering here
Step 3: In Eclipse navigate to HELP>>JRebel Config center >> Activation And activate the JRebel
Step 4: In Eclipse navigate to HELP>>JRebel Config center >> OverView
Step 5: Add  server  by checking the checkbox as shown below
Step 6: Add liferay portlet project  by checking the checkbox as shown below
   OR alternatively you can add project by Right click on portlet project and Add Jrebel Nature as shown
    Find newly created jrebel nature here--> .docroot >> WEB-INF >> src >> rebel.xml
Step 7: In Eclipse navigate to HELP>>JRebel Config center >> Plug -Ins And select liferay in plugins as shown
 Step 8: Double click on server  And in Publishing section make sure that  "Never publish automatically" is selected And in JRebel section enable jrebel agent as shown below
Step 9 : Make sure that Automatic Build is enabled
Step 11: Now you can enjoy coding without redeploy and SAVE TIME.
Warm Regards
Mohammad Azaruddin

SSO via CAS in liferay

General Blogs April 18, 2013 By mohammad azaruddin

All creadit goes to Subhash Pavuskar

Here are some links with snapshots, which is same as below given 35 steps:


Steps to follow:

1- Install CAS

  • Download the CAS server distribution(i'm using 3.4.5 version).All the (recent) downloads are available here :
  • Download either ZIP or TAR GZ

2- Exploding that tar.gz, I grabbed the cas-server-3.4.5/modules/cas-server-webapp-3.4.5.war

3- Rename the file to cas-web.war.

4- Copy the war file and paste it to the Tomcat webapps directory.


  •  I didn't stop Tomcat before, so with Tomcat still running, I hit http://localhost:8080/cas-web/ in a browser and was helpfully redirected to http://localhost:8080/ cas-web/login .
  • Default demo CAS webapp authenticates where username equals password, so I tried logging in as "" and  password as ""

6- CAS helpfully told me I was logged in, though of course not logged in to anything useful, since I didn't try to log in to any particular application.

Configure Liferay to use CAS for authentication

7- Create an account in liferay with and password, which is same as CAS account.

8- To download the Yale CAS Client 2.0.11 go to and Download cas-client-2.0.11.tar.gz

9- extract the cas-client-2.0.11.tar  file .

10- Navigate to the folder  (cas-client-2.0.11\java\lib).

11- Copy the file(casclient.jar). which is present inside cas-client-2.0.11\java\lib folder

12- Go to the lib folder in Tomcat (webapps\ROOT\WEB_INF\lib) and paste the casclient.jar file to replace the existing one.

13- Open command prompt.In the command prompt go to the ROOT directory. (liferay-portal-6.1.1-ce-ga2\tomcat-7.0.27\webapps\ROOT )

14- Enter the following in command

keytool -genkey -alias tomcat -keypass changeit -keyalg RSA

15- Enter changeit for the password.

16- Answer the list of questions. Note that the first and last name must be the host name of your server and cannot be an IP address. This is very important because an IP address will fail client hostname verification even if it is correct.

Enter keystore password: changeit
What is your first and last name?
: localhost
What is the name of your organizational unit?
What is the name of your organization?
What is the name of your City or Locality?
What is the name of your State or Province?
What is the two-letter country code for this unit?
Is CN=localhost, OU=Unknown, O=Unknown, L=Unknown, ST=Unknown, C=Unknown correct?
: yes

17- Enter the following command to export the cert you generated from your personal keystore:

keytool -export -alias tomcat -keypass changeit -file server.cert 

18- Enter changeit for the password.

19- Import the cert into Java's keystore with this command:

keytool -import -alias tomcat -file %FILE_NAME% -keypass changeit -keystore "%JAVA_HOME%/jre/lib/security/cacerts"

( Make sure in place of %FILE_NAME% type server.cert )
20- Enter changeit for the password.

21- Enter yes. Finally minimise command promt.


 Now go to webapps\ROOT\WEB_INF\classes folder in Windows(that is not in command prompt)


22- To set up Liferay Portal, navigate to the classes file in Tomcat (webapps\ROOT\WEB_INF\classes).

23- Create if it does not exist yet, somewhere in the server classpath:

24- Open and enter:


25- Save.

26- Re-Start Tomcat and go to Liferay Portal --> Login to Liferay through the username and password login box at left -- if users will exclusively login with CAS. ( Rather then clicking the Sign In link at the upper right. )

27- Go to Control Pannel -> Portal Settings -> Authentication -> CAS 

(a)- Check on Enabled
(b)- Make sure type all URL same as mentioned in file 

28- Save it.

29- Then Sign out from Liferay.

30- Again Sign In into Liferay by clicking the Sign In link at the upper right.

31- If everything is set up correctly you will be redirected to the CAS server’s login screen.

32- logging in as "" with "" as password.

33- CAS sends you back to Liferay with a valid Service Ticket, Liferay validates the Service ticket, and you are logged in Liferay as that test user.

34- Then Click on Sign Out

35- Since Liferay is now configured to use CAS, it will send you to the CAS logout URL.



Congratulation you have configured Liferay with cas default functionality.






Mohammad azaruddin

Showing 2 results.