This is the default setting, in which each WAR has its own session.
The session within each WAR is private, and nothing is shared between
individual WARs. Portlets and Servlet within the same WAR file will be
able to share the session, because they are in the same context. So far,
this conforms to the Servlet spec.
Liferay provides an additional functionality under this setting. As the official FAQ
states, it also allows shared (namespaced) attributes set by the portal
to be visible from portlets. Any session attribute with the configured
prefix (e.g. LIFERAY_SHARED_) will be copied over and be visible by the
portlets, hence granting private portlets read-access to session
attributes set by the portal.

2) Private Session = False

All portlets under this setting will share the same session, and also
share this same session with the portal. This is the easiest way for
portlets in individual WAR files to communicate with each other.
However, the downside to this is that servlets in these WAR files
will not be able to communicate with the portlets at all. (This is a
question often raised in the forums, and one I struggled with for a while to figure out).
The most convenient way to think of this is that portlets with this
setting use the portal session, and have no access to the WAR session.

So, to summarize ::

Non-private portlets read and write to the Portal session.

Private portlets write to their own WAR session.

Private portlets try to read from their own WAR session first, then
looks up any shared attributes copied from the Portal session.

Servlets only have access to the WAR session, and cannot directly
access the Portal session. In order to read shared session attributes,
servlets need a private portlet in the same WAR file to copy it for
them. Or you can configure your servlet to use the portal session by
using Liferay's PortalDelegateServlet mechanism.

I hope this has helped you in your understanding of Liferay’s session
sharing mechanism.

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

Monday, December 24, 2012

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.

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.

Dont just assume that spring/hibernate/spring-mvc will be best
choice for you. create small proof of concepts with atleast 3 to 4
options.

Try to automate integration/build/deploy with CI tools like Hudson

Check and Tune SQL generated by Hibernate (time to time)

do not let business logic creep into view layer. hate jsp scriptlets? Consider Velocity/Freemarker. JSP is not the only option.

externalize the environment specific configuration by using Spring's PropertyPlaceholderConfigurator.

If possible, try to integrate with existing User Authentication
mechanism (Like LDAP/ OpenID) rather than writing your own. This will
save you from reinventing the wheel and your users from remembering yet
another set of username and password.

There are several things you'll need for
architecture design documents. Not an easy task but props on taking the
opportunity. Since this is such a large question, hopefully these links
can get you started and you can refine questions after getting your feet
wet.Methodology
The methodology you use will affect what tasks you take on first. Waterfall is a popular but outdated methodology. A newer methodology is Agile that has several faces. My favorite is Scrum Agile for developing software of any size.DiagramsDiagrams
are one of the most powerful ways to represent the system as a whole
and as individual components. The type of diagrams you create depend on
the system. There are usually a Structure Diagrams, Behavior Diagrams,
Interaction Diagrams and tons of others. These diagrams show the pieces
of the system as a whole, each components physical layout and/or logical
layout, communication flow, procedure flow, etc..Documentation
Documentation is just like it sounds, documents and documents that
have Project Descriptions, Scope, User Cases, Sequence Diagrams, and any
other document that describes the project or pieces of the project.