Hi,

On Mon, Jan 5, 2009 at 9:46 PM, JY <[email protected]> wrote:
> ...For example: The page http://example.com/main can be modified by one of 
> this
> file :
>
> /
> |- main.html (for modifications with an HTML Editor like DreamWeaver)
> |- main.doc (for modifications with MS Office)
> |- main.odt (for modifications with OpenOffice)
> |- main.wiki (for modifications with Notepad with Wiki Syntax)
> |- main.pdf (read-only PDF format for export)..

Sling makes it easy to map these URLs to scripts or servlets which
each handle their own extension: if your /main node has a property
sling:resourceType with value "foo" for example, /main.html can be
processed by a script at /apps/foo/html.esp, and /main.odt with a
script at /apps/foo/odt.esp.

In the opposite direction, when POSTing modified files, Sling cannot
currently map the request extension to a script or servlet, but it can
use what we call a selector for that, so for example a POST request to
/main.htmlformat.html could be handled by a script at
/apps/foo/htmlformat.esp. The selector is "htmlformat" in that case.

An additional problem if you want to work with WebDAV is how to make
the main.html, main.odt, ... files appear in the WebDAV directory
listing, for this you'd need some additional custom code.

HTH,
-Bertrand

>
> Can Sling help me to do that?
>
>

Reply via email to