Hmm. I'll look at the Props. Thanks! Chas.
Timothy Perrett wrote: > You wouldn't be hard coding it per say, the actual value would be > either held in an external config file, or passed as a system property > I.e -Drun.mode=staging > > Check out Props in net.liftweb.util > > Otherwise, I'm not sure if there is a way of getting the expanded war > path or whatever... Not that I know loads about containers, but don't > they all do it differently (the expanding and serving that is)? > > Cheers > > Tim > > > On Feb 23, 9:57 pm, "Charles F. Munat" <[email protected]> wrote: >> That would be better, but it's still hard-coding an absolute path. What >> I'd really like to do is set the path relative to the web root so that >> it just works no matter what machine I put it on. If I hard-code by run >> mode, I still have to remember to change it if I change servers or move >> the root folders around. >> >> Having said that, I, ah, hate to say this, but... run mode? It suddenly >> occurs to me that I have never paid any attention to run mode, so I am >> probably running all these production sites in debug mode. How does one >> set the run mode? >> >> Thanks! >> >> Chas. >> >> Timothy Perrett wrote: >>> Sorry, let me clarify that a bit more with an example... could you not >>> dynamically set the upload path based on run mode? >>> http://github.com/dpp/liftweb/blob/1bf23d21dff2a752b8b53ce96a83ba5d8d... >>> Cheers, Tim >>> On Feb 23, 1:26 pm, Timothy Perrett <[email protected]> wrote: >>>> Chas, >>>> Why dont you simply use property configuration based on the run mode? >>>> Cheers, Tim >>>> On Feb 23, 5:42 am, "Charles F. Munat" <[email protected]> wrote: >>>>> I am doing file uploads to several of my sites. Right now, I've hard >>>>> coded the path to the directory to which the files are saved. This is a >>>>> pain because it's not the same directory on the production server as it >>>>> is on the dev server. >>>>> How can I grab the current path so I can work with that? Or is there a >>>>> better way? For example, if I had an /images/ directory in my web root, >>>>> how would I save uploaded images to that directory? >>>>> Thanks, >>>>> Chas. > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Lift" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/liftweb?hl=en -~----------~----~----~----~------~----~------~--~---
