Liferay under non ROOT with portlet using PortletListener

I am running liferay on tomcat and trying to grab some custom session variables using a vaadin application, the below example grabs the screenname which works perfectly well when running the the liferay portal servlet under the ROOT context and based on the PortletDemo example.

In the init()

        if (getContext() instanceof PortletApplicationContext) {
            PortletApplicationContext ctx = (PortletApplicationContext) getContext();
            ctx.addPortletListener(this, new DemoPortletListener());
        } else {
            getMainWindow().showNotification("Not inited via Portal!",

With this PortletListener

    private class DemoPortletListener implements PortletListener {

        public void handleRenderRequest(RenderRequest request,
                RenderResponse response) {

            // Get Liferay ScreenName
            PortletSession psession= request.getPortletSession(); 
            String ScreenName = (String) psession.getAttribute("screenname", PortletSession.APPLICATION_SCOPE);


In production I want to run it under another context such as /portal and I can not get this working.

I installed the vaadin.jar and added the themes and widgets to the file as below and changing the path of the vaadin.resources, this stopped the widget errors I was initially getting so I assume the portlet can access widgets and themes correctly with this setup:


The problem I have is that when running liferay under /portal the listener does not seem to be initiated correctly. Can anybody help here. Thanks

did you found solution for this.