Hi Andrew, This 405 error corresponds to a bug that has recently been fixed. I suggest that you try again with a recent snapshot.
Best regards, Jerome Louvel -- Restlet ~ Founder and Lead developer ~ http://www.restlet.org Noelios Technologies ~ Co-founder ~ http://www.noelios.com -----Message d'origine----- De : Andrew Moore [mailto:rp.andrew.mo...@gmail.com] Envoyé : vendredi 30 octobre 2009 16:46 À : discuss@restlet.tigris.org Objet : Re: Query Parameters for Directory Restlets and static files (405 error) Any ideas anyone? Is there another list somewhere I should be posting this? Regards, Andrew Andrew Moore wrote: > > Hi, > > I'm still learning REST, HTTP, and Restlets... so this may be a basic > question, but here goes... > > My situation/problem space: > > We have a javascript heavy client and I am trying to set up a way of > testing individual UI components, while reusing the same javascript > includes (so everyone knows if something has broken with our proprietary > javascript library, regardless of what component someone is working on). > > So I setup two static files: a test index.html file with links to a > TestViewer.html file, for which I am using a Directory resource to give > clients access to them. > > My goal was to have links from the index.html file be of the form: > > /myapplication/tests/TestViewer.html?testfile=/myapplication/tests/component s/mywidget.js > > The TestViewer.html has all the includes for the javascript library, > parses out the testfile query parameter, and dynamically includes the > "mywidget.js" file for testing out the component. > > > My Problem: > > Unless my cache for my browser has been flushed (for either IE or > Firefox), when I try navigating to the TestViewer.html static file with > query parameters appended to the basic file's URI, I get a 405 "Method Not > Allowed" http error. > > What concept or setting up of my Directory resource am I doing wrong? > > Code snippet from my Restlet Application class: > > LocalReference staticContentDir = > LocalReference.createFileReference(rootPath); > > Context context = component.getContext().createChildContext(); > > Directory staticContent = new Directory(context, staticContentDir); > staticContent.setDeeplyAccessible(true); > staticContent.setListingAllowed(false); > staticContent.setModifiable(false); > > Any insights? Thanks in advance for your help! > > Regards, > > Andrew > > > > > > -- View this message in context: http://n2.nabble.com/Query-Parameters-for-Directory-Restlets-and-static-file s-405-error-tp3906669p3919724.html Sent from the Restlet Discuss mailing list archive at Nabble.com. ------------------------------------------------------ http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=24130 38 ------------------------------------------------------ http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2413764