Portlet Session in Portlet 1.0
It could not just simply remove the session attribute by using invocation removeAttribute.
You have to remove it by setting it to null.
Life has to be exciting.
It could not just simply remove the session attribute by using invocation removeAttribute.
You have to remove it by setting it to null.
from http://www.andypemberton.com/jboss/compress-your-jboss-portal-theme-with-packtag/
The goal of this article is to show you how to use pack:tag to optimize the performance of your JBoss Portal theme. I’ve used this approach on a production JBoss Portal 2.6 implementation and tested the approach out in version 2.7.
JBoss Portal has a feature-rich theme framework where CSS and javascript resources are included in the Portal; building a custom theme is easy. Pack:tag is an open source project that optimizes performance for java-based web apps; it provides a JSP tag library that automatically minifies, compresses, and combines CSS and javascript resources.
As more rich features and dynamic components reach your portal, larger AJAX frameworks and CSS libraries are required to support them. Large downloads will not only make your Portal load slower, but will also take longer to execute when using the Portal. Also, Portals are no longer accessed solely inside the firewall, many companies use them to power external facing sites - so few assumptions should be made about client bandwidth. Compressing your Portal theme with pack:tag will lead to faster downloads and page response time.
Building a custom Portal theme is covered in depth elsewhere, so we won’t get into that here. Instead, let’s look at the steps necessary to get your theme working with pack:tag:
Check out the following Firebug screen shots depicting the actual file size savings in our custom theme:
That’s right! Adding pack:tag resulted in:
Remember NOT TO PACKAGE the portlet api into the war file! It will fail the deployment!
Problem description as follow:
17:21:51,982 ERROR [PortletWebApp] An error occured when the portlet started
org.jboss.portal.portlet.PortletInitializationException: The portlet … threw a runtime exception during init
at org.jboss.portal.portlet.PortletContainer.start(PortletContainer.java:228)
at org.jboss.portal.portlet.PortletWebApp.startService(PortletWebApp.java:100)
at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:274)
at org.jboss.system.ServiceMBeanSupport.start(ServiceMBeanSupport.java:181)
at org.jboss.portal.common.system.AbstractJBossService.start(AbstractJBossService.java:73)
……….
at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.run(AbstractDeploymentScanner.java:182)
Caused by: java.lang.ClassCastException
at org.jboss.portal.portlet.PortletContainer.start(PortletContainer.java:194)
… 113 more