when moved the file from /resources/foo.xml to /foo.xml (in the same path as index.html), it now finds it. i guess getResourcePaths() and getResourceAsStream() don't necessarily look in the same place.
On Oct 30, 1:58 pm, bob <rbpas...@gmail.com> wrote: > i had call to do something similar, and here's the code. i'm sure > someone smarter could replace the for comprehension with filter().map > () > > def getPaths(prefix : String) : Set[String] = { > > // Resource Paths as an Array[Object] > var jpaths = > S.servletSession.open_!.getServletContext.getResourcePaths > (prefix).toArray > > // convert to a Set[String] > var paths = Set() ++ jpaths.map(_.asInstanceOf[String]) > > // append children > for (path <- paths if path.endsWith("/")) { > paths = paths ++ getPaths(path) > } > paths > } > > here's what my app gets back: > > Set(/index.html, /WEB-INF/web.xml, /templates-hidden/, /WEB-INF/, / > templates-hidden/default.html) > > what I still don't understand is why it doesn't return the XML > configuration file that is found by getResourceAsStream() :( --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---