You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Current »

Classpath is a parameter that tells the Java Virtual Machine or the Java compiler where to look for user-defined classes and packages. The classpath of a Magnolia webapp includes any JAR files in /WEB-INF/lib and any classes and resources in /WEB-INF/classes.

The advantage of storing resources in a module JAR is that the resources become part of the software lifecycle and follow the same release process as code. Since such resources are not editable inline, this approach works for items you don't need to edit often such as template scripts, background graphics and logos.

The path for resources served from classpath is:

http://<domain>/<contextPath>/.resources/<path-to-file>

The URI mapping configuration that resolves resources from a location that starts with /.resources (note the dot) is in the Configuration app > /server/filters/servlets/ClasspathSpoolServlet.

Magnolia uses the dot naming convention for resources in the classpath to avoid confusion with file location names assigned by developers. This is a convention that is used in other file locations too, such as .magnolia.

#trackbackRdf ($trackbackUtils.getContentIdentifier($page) $page.title $trackbackUtils.getPingUrl($page))
  • No labels