Naftoli,
Can you explain what your trying to do? My assumption is that you have a secondary jar away from your WAR and you want to load template from there? A completely valid use case... Right now there are ways of doing it but you then don't get a lot of the stuff lift provides for free (like template localization) - you would essentially need to re-implement this if you need it. I wanted to do something similar a while back, and DPP did say he'd write an example but I think he got a bit swamped with other things. Ross is right when he says you'd need to do something with ViewDispatchPF: type ViewDispatchPF = PartialFunction[List[String], Either[() => Box[NodeSeq], LiftView]] Does that help? Cheers, Tim On 22/07/2009 06:11, "Ross Mellgren" <dri...@gmail.com> wrote: > > ResourceServer is for static things, if I understand correctly. I > don't think it's used for template lookup. Taking a quick glance (and > I'm no expert at lift) it looks like it looks for templates just in > the servlet context (e.g. in your WAR) and view packages under any > packages registered with LiftRules.addToPackages unless you muck with > LiftRules.viewDispatch or LiftRules.finder. > > -Ross > > On Jul 22, 2009, at 12:55 AM, Naftoli Gugenheim wrote: > >> >> Now a direct call to ResourceServer does work, but the template is >> still not being found. Any ideas? >> >> ------------------------------------- >> Naftoli Gugenheim<naftoli...@gmail.com> wrote: >> >> In order to diagnose why my template isn't getting loaded from its >> jar, I'm calling the following in a snippet: >> ResourceServer.findResourceInClasspath(S.request.open_!, >> "tableeditor" :: "default.html" :: Nil) >> When I navigate to the snippet I see: >> Exception occurred while ... >> Message: java.io.FileNotFoundException: JAR entry toserve/ >> tableeditor/default.html not found in (name of the jar file) >> >> sun.net.www.protocol.jar.JarURLConnect.connect(JarURLConnection.java: >> 122) >> It certainly looks to me like the file is there in the jar. Besides, >> if it wasn't, how would it know which jar it's not in? What does >> this mean? >> Thanks! >> >>> > > > > > --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---