Stéphane De Jonghe wrote:
> Hi everybody,
>
> I 'm currently testing slide 1.0.12 and using it with the
> FileContentStore set on.
If you want to use the FileContentStore to store permanent data set
resetBeforeStarting=false
and use a JDBC store to store the structure.
> I would like to know if it is possible to create from blue a web folder
> containing a file (e.g. : a word document) or a link to a file that i
> can access using WebDAV ?
>
> For example, I created a servlet that create a web folder that I can
> access from my windows explorer. I can copy a file in the /files folder
> (I have the root privilege) and opening it from word (this file also
> exist in the /contentstore/files directory on the server depending of my
> domain configuration).
> Now I would like to create a web folder where there is already this file
> (or the link to this file) set. My problem is to evoide to copy a file
> from a filesystem to the webfolder and only after to work on it.
>
> Do you think is it possible to do it without developping too much ?
There are several solutions possible, most of the time you want to do
something like that when
you have created a new user, new dossier or importing from a legacy system.
I would use a small java program (behind a jsp page if you want) to do
things like that.
Something like:
public static void main(String[] args)
{
try
{
HttpClient client=new HttpClient();
client.startSession("localhost",8080,new Credentials("dirk","dirk"));
// client.setDebug(10);
MkcolMethod mc=new MkcolMethod();
mc.setPath("/slide/files/dossier1");
client.executeMethod(mc);
PutMethod pm=new PutMethod();
pm.setPath("/slide/files/dossier1/briefing.doc");
pm.sendData(new File("briefing-template.doc"));
client.endSession();
}
catch (Exception ex)
{
ex.printStackTrace();
}
}
Make the dossier name a form parameter and let the jsp page return the url
for the webdav folder and that's it...
Dirk