Re:PostableResource problem

>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 UTC