provide-free-support Ujjwal's Blog: liferay
Showing posts with label liferay. Show all posts
Showing posts with label liferay. Show all posts

Thursday, December 27, 2012

Liferay Session Sharing

Hi,


I had a requirement for sharing session information from Liferay Portal to Servlet deployed in same Liferay server. so, i developed Liferay portlet which callsPortalSession setParameter method and i store a string value to it. In my servlet, i use request.getSession().getParameter("NAME").

But, unfortunately, i got null value there. (Please note that servlet was a plain servlet and does not contain any liferay code in that war). After doing some reserarching, i found below evidence to achive this ::







STEP 1.

For Portlets who will share (i.e setAttribute() ) session attributes(s) need to add following entry in liferay-portlet.xml

<portlet>
<private-session-attributes>false</private-session-attributes>
</portlet>

STEP 2.

By default “LIFERAY_SHARED_”  prefix is used for sharing session attribute to other WARs.  It can be customized with in portal.properties ‘s session.shared.attributes value.

portletSession.setAttribute( "LIFERAY_SHARED_myVar",value,PortletSession.APPLICATION_SCOPE);

Other portlet(s)  in different WAR  can access it as below :

portletSession.getAttribute( "LIFERAY_SHARED_myVar",PortletSession.APPLICATION_SCOPE);


by implementing above code, i was able to get value stored in one portlet in other portlet which are deployed in different war files.

Now, i added a servlet in portlet where i was getting value from session.

I added below entry in liferay-portlet.xml

<portlet>
<private-session-attributes>true</private-session-attributes>
</portlet>

and i added below code in my portlet

Object value=portletSession.getAttribute( "LIFERAY_SHARED_myVar",PortletSession.APPLICATION_SCOPE);

 request.getSession().setAttribute("NAME", value);

Now, in my servlet, i was able to get value of NAME session attribute as below ::

Object valueFromSession=request.getSession().getAttribute("NAME");

For knowing more on Private Session xml attribute, refer my next blog post.

Cheers,

Ujjwal Soni

Monday, December 24, 2012

Experience with Liferay

Hello Everyone,

I would just like to share my experience on my first project with Liferay. I have used themes, layouts and Struts 1.2 along with Hibernate 3.2 with this project, the integration of all these 3 was quite complex but once you have cracked it down, it becomes easy.


I found liferay quite easy and managable. Conversion of existing struts/spring framework projects is quite easy.


Cheers,

Ujjwal Soni

Liferay vis-a-vis Other Portal Frameworks

Licensing

Liferay vs. Closed Source Portals
�Innovation - In its 9th year of development, Liferay boasts a history of innovation among both commercial and open source products.
�Low TCO - Liferay provides the lowest total cost of ownership with ZERO license fees under the MIT license.
�High ROI - Use your existing IT investment. There is no application server agenda and no pressure to pay for tools Develop portlets with a full featured IDE like Eclipse, Netbeans, and JBuilder or with lightweight editor like EditPlus, VI, and Emacs.
�Freedom & Flexibility - Open source means the code is in your hands. If you want to customize it, you can. If there are security flaws, the community can participate in fixing it quickly.
�Security - There is actually less risk in going with a sustained open source product than in going with a commercial vendor. Vendors can go out of business. Vendors can merge and render your product dead in the water. A sustained open source product like Liferay Portal has an active community around it that works together.

Liferay vs. Open Source Portals
�Market Leadership - Liferay is the leader in downloads among all open source Java portals.
�Principle - Not all open source licenses are created equal. Some require modifications to be contributed if you choose to sell or distribute your product. Some still charge a license fee for commercial use.
�Maturity - Liferay has one of the most mature and active open source communities as evidenced by the active forums.
�Stability - Aside from the impressive community, there is a real company behind the product driving product development.


Cheers,

Ujjwal Soni

Thursday, June 28, 2012

Liferay goes Dropbox: Liferay Sync

Liferay announced a powerful feature that reminds me of Dropbox: Document synchronization.


It will allow you to access your files on- and offline on a various list of devices. Read the press release here: Liferay Sync

If you have any questions then feel free to comment..

Cheers..

Ujjwal Soni

Wednesday, June 13, 2012

Beginning Liferay - Installation and Execution

Hi,

I recently begin my Liferay learning by installing letest version of Liferay Portal 6.1 Community Edition from www.liferay.com. I downloaded and extracted it in macosx. I downloaded tomcat bundled installation.

After extracting it in a specific folder run the below file from terminal (in mac osx)::

LIFERAY_PORTAL/liferay-portal-6.1.0-ce-ga1/tomcat-7.0.23/bin/startup.sh

If you are running it in windows, you can run startup.bat file.

I have just installed liferay on my machine, now i will begin learning portlets and development using life ray.

Keep reading my blog for more updates

thanks,

Ujjwal soni
best-it-exam-    | for-our-work-    | hottst-on-sale-    | it-sale-    | tast-dumps-us-    | test-king-number-    | pass-do-it-    | just-do-it-    | pass-with-us-    | passresults-everything-    | passtutor-our-dumps-    | realtests-us-exam-    | latest-update-source-for-    | cbtnuggets-sale-exam    | experts-revised-exam    | certguide-sale-exam    | test4-sale-exam    | get-well-prepared-    | certkiller-sale-exam    | buy-discount-dumps    | how-to-get-prepared-for-the    | in-an-easy-way    | brain-dumps-sale    | with-pass-exam-guarantee    | accurate-study-material    | at-first-try    | 100%-successful-rate    | get-certification-easily    | material-provider-exam    | real-exam-practice    | with-pass-score-guarantee    | certification-material-provider    | for-certification-professionals    | get-your-certification-successfully    | 100%-Pass-Rate    | in-pdf-file    | practice-exam-for    | it-study-guides    | study-material-sku    | study-guide-pdf    | prep-guide-demo    | certification-material-id    | actual-tests-demo    | brain-demos-test    | best-pdf-download    | our-certification-material    | best-practice-test    | leading-provider-on    | this-course-is-about    | the-most-reliable    | high-pass-rate-of    | high-pass-rate-demo    | recenty-updated-key    | only-for-students-free-download    | courseware-plus-kit-for    | accurate-answers-of    | the-most-reliable-id    | provide-training-for    | welcome-to-buy    | material-for-success-pass    | provide-free-support    | best-book-for-pass    | accuracy-of-the-answers    | pass-guarantee-id    | pass-exam-key    | pass-sku-id    | study-for-exid    | pdf-sku-exid    | sku-pdf-id    | pdf-demo-key    | exam-demo-ske    | pass-it-dump    |
http://www.menuiserie-dauvergne.com/    | http://www.menuiserie-dauvergne.com/    |