views:

816

answers:

1

I think that it used to the be the case that in Liferay 4, if a war contained both a portlet and a servlet, the servlet was initialized before the portlet. Now with Liferay 5 I notice that the opposite is going on. How can I setup my web application, or Liferay to always have the servlets initialized before the portlets?

A: 

While Liferay 4 lazy loads portlets, because of performance related issues, Liferay 5 is aggressively loading portlets when the web application is being deployed.

So the solution is to instead (or in addition) of doing the initialization when the servlet are initialized, to do it when the servlet context listener is initialized, which happens before the portlet is initialized. More detail in step 1 of those instructions.

Alessandro Vernet