W3C home > Mailing lists > Public > www-jigsaw@w3.org > July to August 1996

Re:PostableResource problem

From: Alexandre Rafalovitch <alex@access.com.au>
Date: Thu, 22 Aug 1996 11:43:12 +1000
Message-Id: <v02140b04ae416873e620@[203.18.229.116]>
To: www-jigsaw@w3.org
>Hi,
>
>I keep getting those strange "Document not found
>The document /User/echo is indexed but not available.
>The server is misconfigured." messages when creating my subclasses of
>PostableResource.
>

Ok. That is how it works. FileResource gives the error message you see,
when it cannot find file it is supposed to serve. That is if there is no
file with the same name in the directory. That is happening in GET method.

PostableResource overrides that GET method and does a lot of its own
things. However, in two instances it calls super(). That happens if
ConvertGet flag is set to false or if there is no query string. In both
cases Postable resource falls back and behave the way any other
FileResource would.

So the behaviour of unmodified PostableResource is: If it is called with
normal Get method and without any query parameters (things after ?) then it
tries to serve file with the same name as a resource. If it is called with
POST method or with GET method and query string AND ConvertGet flag is set
then PostableResource invokes handle method.

In your case you have done everything right, but you are trying to call the
resource directly. Try to do "/User/echo?it=works" and you will see that
everything is working. Alternatively, you can supply a file called echo in
User directory and it would be served. (as a text, not html in this
particular case, because text/html mime type is only defined for .html
files)


Hope it helps,
    Alex.

Ps. Welcome to the list.  :-}

alex@access.com.au
Received on Wednesday, 21 August 1996 21:43:48 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 9 April 2012 12:13:25 GMT