Re:PostableResource problems

At 11:59 AM +1000 15/11/96, Craig Brozefsky wrote:
>I did not see this in the archives so I figured i would post it.
>
It was somewhere in the archives, but it is buried in other topics.

>
>I was trying to do some benchmarking last night and wanted to use
>w3c.jigsaw.forms.PostableResource to simulate a very simple jigsaw
>resource handling class.  I went into the Editor and attempted to "Add
>Resource" to my root and it went smoothly.  Even was able to go back to
>"Existing Resources" for root and edit the attributes of my test
>PostableResource resource.  Then when I attempted to access it I get:
>
>Document not found
>The document http:blagblah is indexed but not available
>The server is misconfigured

Catch number one. What is the purpose of PostableResource? It is to serve
the file with form in it and then when the data comes back with POST
method, echo the variables and values back to the user.
Therefore, you need a file with a form for the PostableResource or always
call it from other form and don't hit it directly. You can also do
something like <http://bla/resource?bla1=1&bla2=2> if convertGet flag is
true. If you look in the code than the secret is in the line 'return
super.get(request)' as the third line of get method in PostableResource.

>
>
>Now i am stymied.  I went to root and did an update all without any luck.
>Should I reindex it?  Is w3c.jigsaw.forms.pOstableResource valid to use
>as a resource to test this?  Should I simply subclass it and write my own
>little toy to do this simple echoing by overridding the handle() method?

As above, if you don't want it to serve anything, but just to see the
reaction, set convertGet to true and call it with some parameters.

>
>Also when I go to root and tell it to reindex all, I usually end up with
>everything getting deleted from the registry.

I am not sure about _everything_ , but a great number of resources will,
including all Admin directory and probably your PostableResource too. This
is a catch number two.

Reindexing a directory deletes all its entries and then tries to recreate
the items in it. It means all the items without filesystem presence will
dissapear and the rest of the files will apear only if their extensions are
registered in extension database.

IMHO it should not do it that way, but with no discussion about the best
way to do it, Anselm is probably finding more important areas to look into.
(I am sure MUX is a very serious problem)

Regards,
  Alex.
Ps. This will become an entry in FAQ very soon (Anselm?)

alex@access.com.au

Received on Thursday, 14 November 1996 21:52:31 UTC