[Lift] Re: using file-based data storage in Lift app

2009-07-06 Thread glenn
Thanks all for your comments on this issue. Based on what you've written, it seems that normal file io works fine in Lift as long as you don't try to affect the exploded war file in the process. In my case, I just simply used XML.loadFile and XML.saveFull from scala directly, pointing to a

[Lift] Re: using file-based data storage in Lift app

2009-07-05 Thread glenn
Thanks, Marius. Now, is there something similar for writing XML to a file. I saw nothing on LiftRules that seems to apply. Glenn... On Jul 4, 12:36 am, marius d. marius.dan...@gmail.com wrote: Try LiftRules.loadResourceAsXml Br's, Marius On Jul 4, 1:11 am, glenn gl...@exmbly.com wrote:

[Lift] Re: using file-based data storage in Lift app

2009-07-05 Thread Timothy Perrett
Marius, Glen, Can I wade in here and suggest that if Glenn wants to use an XML datasource, then writing an XML backend for Record would be the best way to go and maintain CRUD semantics out of the box? Cheers, Tim On Jul 5, 8:40 pm, glenn gl...@exmbly.com wrote: Thanks, Marius. Now, is

[Lift] Re: using file-based data storage in Lift app

2009-07-05 Thread Naftoli Gugenhem
Why would lift interfere with file io? Resource server is probably for static http. If you're getting file not found I can't imagine it's lift's fault. Try dumping new java.io.File(.).listFiles() or .getAbsolutePath etc. to see what directory is the default. What kind of server are you using?

[Lift] Re: using file-based data storage in Lift app

2009-07-05 Thread Timothy Perrett
If you need to get the absolute path where the exploded war is living, you can get that via ServletContext I do believe. Generally speaking, Lift provides no mechanism for writing stuff to the filesystem and does not interfere with file i/o. Cheers, Tim On Jul 5, 9:15 pm, Naftoli Gugenhem

[Lift] Re: using file-based data storage in Lift app

2009-07-05 Thread David Pollak
The broader issue is that how a WAR file is exploded (converted from WAR/Zip format to an on-disk representation) is a servlet-container specific issue. Putting an XML file in your WAR and reading from it is totally cool. The abstraction that Marius pointed to is the correct one... and more

[Lift] Re: using file-based data storage in Lift app

2009-07-04 Thread marius d.
Try LiftRules.loadResourceAsXml Br's, Marius On Jul 4, 1:11 am, glenn gl...@exmbly.com wrote: I've searched this group and combed through the lift book for an answer, but found none - how to use file-based storage for data within Lift. For example, how would I call something like: def