Open source, commercial support.
- Integrate with FCKEditor
- Using the displayname field
- Character encoding
- Client compatibility
- Efficient deleting
- Connecting to webdav
- Caching and Modified Dates
- Configuration
- Open folder from web page
- Using Caldav
- Create your own dav servlet
- Custom Webdav Properties with Annotation
- Http logging and DebugFilter
- How to support PROPPATCH
- Users Guide
- Modules
- Integrating with non servlet applications
- Permission Dependent Resources
- Running on the root context
- Security in webdav: Authenticate and Authorise
- Test scripts
- Using milton with jquery datatable
- ZSync
The DAV spec defines a "displayname" field which can contain any arbitrary text representing the name of a resource to the end user. This field doesnt form part of the url.
But most people usually want the displayname field to be the same as the resource name, ie Resource.getName(). This is what Milton does by default.
However, Milton allows you to change this behaviour by dependency injection.
The displayname property is determined by the injected instanceof DisplayNameFormatter, which gets injected into the WebDavProtocol class (see configuration, or below). Two default implementations are provided:
- DefaultDisplayNameFormatter: which just returns Resource.getName()
- CdataDisplayNameFormatter: which wraps another DisplayNameFormatter and puts the content inside a CDATA element
As of the time of writing (13/7/2010) its not certain that the displayname field ever needs to be put inside a CDATA section, but Apache Slide appears to do so.
How to set your implementation into milton
It gets set on a property of the WebDavProtocol class:
WebDavProtocol p = ...;
p.setDisplayNameFormatter(.. your implementation...)
How you get a reference to WebDavProtocol depends on how you do your configuration. If you're using the simplified HttpManager constructor, as is used in MiltonServlet, you might want to write a little bit of code to find it...
(pseudo code)
for(ph : httpManager.gethanders() {
if( ph instanceof WebDavProtocol ) {
... set the display name formatter property
}
}
But if you configure everything through spring you can do it from the config file.