Static resource handler

The "/" mapping for the "default" servlet is now replaced by mapping for the org.exoplatform.portal.application.PortalController servlet. It means that you need a handler (org.exoplatform.portal.application.StaticResourceRequestHandler) to serve static resources like image, CSS or JavaScript files in portal.war. And it should be configured, and extended easily thanks to the controller.xml file. This file can be overridden and can be changed and reloaded at runtime (WebAppController is MBean with some operations, such as reloadConfiguration()).

Declare StaticResourceHandler in controller.xml

<route path="/{gtn:path}">
  <route-param qname="gtn:handler">
  <path-param encoding="preserve-path" qname="gtn:path">

And you do not need these kinds of the following mapping in the web.xml in portal.war anymore.

Copyright ©. All rights reserved. eXo Platform SAS
blog comments powered byDisqus