Geomajas Community Documentation

1.1.2. dojo build

For development using the dojo face, apart from using the "-DskipShrink" setting mentioned higher, you may also want to configure the ResourceController to try to directly read the javascript files from disk before looking at the classpath (it also changes the cache headers). This allows a simple refresh in the browser to load the changed versions. You can configure this using a init-param for the dispatcher servlet, like in this example.

<servlet>
    <servlet-name>dispatcher</servlet-name>
    <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
    <init-param>
        <param-name>files-location</param-name>
        <param-value>/home/me/apps/java/geomajas/geomajas/geomajas-dojo-client/src/main/resources</param-value>
        <description>
            When this is specified, files are searched here first.
            Files which are found at this locations are not cached.
        </description>
    </init-param>
    <init-param>
        <param-name>contextConfigLocation</param-name>
        <param-value>classpath*:META-INF/geomajasWebContext.xml</param-value>
        <description>Spring Web-MVC specific (additional) context files.</description>
    </init-param>
    <load-on-startup>3</load-on-startup>
</servlet>