I am trying to create a custom login portlet in WEF, so i have to lookup JNDI for portal login service. As in java portlet we do this lookups in init() method and then call the login method from performedAction. Similarly in WEF, i am trying to lookup for this JNDI from a method written in java class and connected with LJO and to replicate init feature i am calling this function on "System:OnWebAppLoad" event.
For testing purpose to check that this function is called once in portlet life cycle, i put some system outs. I deployed this war, and created portal anonymous page and placed my custom login portlet in this page. Now when i am accessing this page first time, system out prints. But when i am going to another portal page and coming back to my page, system out prints again.
As i did this print on webAppload, it sholud not print again. because i think webAppload first time when portlet access.
Please need help to find out what i am missing. I am attaching my archive for reference.