Are you able to debug com.noelios.restlet.local.DirectoryResource? That looks like where the problem might be but the code is so obscured by URI processing logic that its tough to read through without valid data.
Is isListingAllowed() true on your Directory instance? On Jan 14, 2008 9:46 AM, Valdis Rigdon <[EMAIL PROTECTED]> wrote: > Yep, I've tried that. In walking through the code via a debugger, I see > my APPLICATION_ZIP representation being built, but it's not the > representation being returned -- the StringRepresentation is with the > HTML contents. > > > Valdis > > > > Kevin Conaway wrote: > > Hi Valids, > > > > Did you try overriding getIndexVariants() to add APPLICATION_ZIP in > > addition to overriding getIndexRepresentation()? > > > > Kevin > > > > On Jan 14, 2008 8:34 AM, Valdis Rigdon <[EMAIL PROTECTED]> wrote: > > > >> I'm looking for a little help in trying to implement a solution with > >> Directory -- maybe someone on this list has done this before; I've tried > >> a number of ways but nothing seems to work quite right. Note that we > >> are using version 1.0.7, not 1.1. > >> > >> My use case involves exposing the log4j logs for our running > >> applications over REST. This works using Directory and handing it a > >> LocalReference to our logs directory. I can hit it and get the > >> generated HTML index page, etc. Now, I'd also like to enhance the > >> resource to return the entire log directory zipped (ie, a snapshot of > >> the logs). My thoughts on this were to simply request an > >> APPLICATION_ZIP representation from the URL (http://localhost/api/log) > >> and override getIndexRepresentation() to return the zipped logs. The > >> zip representation is never returned however. I've tried using > >> http://localhost/api/log?media=zip to force it, as well as written a > >> REST client hitting the URL and the wrong representation is sent back. > >> Has anyone extended Directory in such a way? > >> > >> I realize I could add a different URL to get this information, but it > >> seems logical that it's just a different representation of the same > >> resource. > >> > >> Any help would be appreciated. > >> > >> > >> > >> Valdis > >> > >> >

