What I'm thinking is that you pass somethign like -Dpath.to.my.csv to
jetty and then read the property from Boot
Regards,
Diego
> --
> Lift, the simply functional web framework: http://liftweb.net
> Code: http://github.com/lift
> Discussion: http://groups.google.com/group/liftweb
> Stuck? Help us help you: https://www.assembla.com/wiki/show/liftweb/Posting_example_code
--
Diego Medina
Lift/Scala Developer
di...@fmpwizard.com
http://www.fmpwizard.com
runtimeOptions in Runtime += Runtime.Setup( () =>
System.setProperty("my.path.to.file", "/Users/Me/file.csv"))
(I'm not sure of the exact sbt syntax, I know that for test mode I use:
testOptions in Test += Tests.Setup( () =>
System.setProperty("run.mode", "test"))
Regards,
Diego
Are you sure the file is being packaged? check inside the resulting
war WEB-INF/classes
> -
--
Robert Marcano
Not saying that this does not work, but I always encourage people to
no use system properties. More that one time I have been unable to
install two instances of the same war on the same VM because people
use one System property
I prefer people use the standard web.xml/context-param setting, this
way it is available to see to any deployer and documented that that
setting exists
--
Robert Marcano
in LiftRules:
private val defaultFinder = getClass.getResource _
getClass.getResource needs the / prefix if not it will look for the
file inside net/liftweb/http (getClass points to LiftRules)
Ok, LiftRules.getResource("/foo.csv") worked after I *manually* copied
foo.csv into target/scala-2.9.1/classes. It's not being copied over
automatically as I expected though. At least, I've read online that
sbt is supposed to do this automatically.
However, if I first run 'sbt package', then the file is copied over
properly. It seems that sbt compile and container:start does not copy
the required resources over. Is this the expected behaviour?
Sandro
On Mar 27, 11:29 pm, naasking <naask...@gmail.com> wrote:
> I'm still not quite clear on what I need to do. Sounds like putting it
> under src/main/resources is the right solution, but running
> container:start in sbt doesn't pick up this. Perhaps I'm missing an
> sbt config option to package this file properly?
>
> You might have to be a little more explicit since I'm not as familiar
> with Java web deployments. It's quite different from .NET. ;-)
>
> Sandro
>
> On Mar 27, 11:19 pm, Robert Marcano <rob...@marcanoonline.com> wrote:
>
>