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/components/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-files-405-error-tp3906669p3906669.html
Sent from the Restlet Discuss mailing list archive at Nabble.com.

------------------------------------------------------
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2412178

Reply via email to