UE Development Tips

Toggling Aggregation

uPortal aggregates and minifies both JavaScript and CSS files, and sets cache headers on these resources.  For more information on uPortal's browser optimization processes, please see Include JavaScript and CSS Resources.

While these techniques improve browser performance for uPortal users, it can be difficult to debug and perform active development in such an environment. To aid user experience developers, uPortal includes a portlet named "Toggle Aggregation" that allows an administrator to turn off aggregation and minification. These unminified files are also exempt from uPortal's normal caching rules.  To disable aggregation, log in as an administrative user, locate the "toggle aggregation" portlet, and click "disable aggregation."  If you restart the portal, you will need to re-disable aggregation.

Disabling caching

Disabling caching will make your portal less performant, of course, but is convenient for seeing changes you make to the theme more immediately.

Disabling caching is no longer configured in the portal.properties file

Step 1: Pass Parameter in JAVA_OPTS

The following parameter needs to be passed in JAVA_OPTS (sometimes it might be called CATALINA_OPTS)

This can vary depending between operating systems and ways to install Tomcat.
 
    -Dorg.jasig.resourceserver.utils.aggr.aggregated_theme=false

In Ubuntu, this line can be added to /etc/init.d/tomcat6:

 

Ubuntu example
 JAVA_OPTS="$JAVA_OPTS -Dorg.jasig.resourceserver.utils.aggr.aggregated_theme=false"

Step 2: Restart Tomcat

Restart Tomcat for changes to be reflected.