Steven Dolg writes:
[...]
However I would guess that's rather far from the
current use-cases
[...]
Quite right:
I'm very interested in a departure from current use-cases:
I want to use Cocoon to configure and maintain a live site
where changes can be made with minimal or no interruptions.
Although not as nice as reloading the sitemap alone,
I found a satisfactory solution by having the servlet
container automatically reload the whole spring context
when the sitemap changes.
Using Tomcat, this can be done very concisely:
myWebapp/META-INF/context.xml:
<?xml version="1.0"?>
<Context reloadable="true">
<WatchedResource>sitemap.xmap</WatchedResource>
</Context>
Alternatively, it can be done with a context file in tomcat/conf:
tomcat/conf/Catalina/localhost/myWebapp.xml:
<?xml version="1.0"?>
<Context docBase="Absolute path to myWebapp" reloadable="true">
<WatchedResource>Absolute path to myWebapp/sitemap.xmap</WatchedResource>
</Context>
The deed can also be done using maven-jetty-plugin and a ScanTarget element:
myWebapp/pom.xml:
...
<plugin>
<groupId>org.mortbay.jetty</groupId>
....
<configuration>
....
<scanIntervalSeconds>5</scanIntervalSeconds>
<scanTargets>
<scanTarget>${webapp.root}/sitemap.xmap</scanTarget>
</scanTargets>
</configuration>
...
I haven't yet found a solution when using Jetty without Maven.
It would be nice if Spring could do a trick like this.
I'm not really happy with methods that depend on the servlet container...
Thanks,
-Hugh Sparks
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]