On Thu, Nov 12, 2009 at 3:57 AM, Cornelius <d...@corcor.de> wrote:

>
> Hi all,
>
> this may be somewhat outdated but I spent some time to figure out how
> to specify different properties with java-properties files:
>
> The doc at http://scala-tools.org/scaladocs/liftweb/1.0/ says, that
> the filename should be somewhat of this:
>
>  modeName.hostName.userName.filename.extension
>
> But (after hours of renaming files under src/main/resources/ and src/
> main/resources/props I finally looked at the code in Props.scala and
> saw this:
>
> # val toTry: List[() => String] = List(
> #                  () => "/props/" + modeName + userName + hostName,
> #                            () => "/props/" + modeName + userName,
> #                            () => "/props/" + modeName + hostName,
> #                  () => "/props/" + modeName + "default.",
> #                            () => "/" + modeName + userName +
> hostName,
> #                            () => "/" + modeName + userName,
> #                            () => "/" + modeName + hostName,
> #                  () => "/" + modeName + "default.")
>
> As for my understanding (just beginning with scala and lift) it works
> just the other ways as the docs suggest:
>
> (bumblebee == hostName, dave == userName and kpo == fileName)
>
> doesn't work:
>  production.bumblebee.dave.kpo.props
>
> works:
>  production.dave.bumblee.props
>

Yep... that's the right combo.

I'll update the docs.


>
> I didn't test all combinations and all places, but it would be great
> if someone could confirm this (or - indeed - guide me in the correct
> direction for the case missed something)
>
> Cornelius
>
> PS.: Nice idea for implementing this kind of run.mode-switching...
> help alot
>
> >
>


-- 
Lift, the simply functional web framework http://liftweb.net
Beginning Scala http://www.apress.com/book/view/1430219890
Follow me: http://twitter.com/dpp
Surf the harmonics

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to liftweb@googlegroups.com
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to