[aida] Custom request handling howto?
janko.mivsek at eranova.si
Fri Nov 23 20:09:42 CET 2007
Nicholas Moore wrote:
> I want to make documents (.pdf, .doc or .html) in a directory available
> for download. I can populate the page easily enough with the document
> links, but when I try to download the link, I get a 404 not found. In
> this case is it best to modify Swazoo or Aida, perhaps by modifying
> ooRefFromURL: as you suggest below? If so how, by using FileProxy?
I think you can do that simply by providing a text url for a link on
your page and setup a right AIDASite>>homeDirectory.
e addLinkTo: '/files/document.pdf' text: 'document.pdf'.
URLResolver will then automatically search for that file in
<homeDirectory>/files and if found, make aFileProxy and register it in
> Janko Mivšek wrote:
>> I think the Url resolution can be extended in two ways:
>> - to extend Swazoo way of resolution also to the sub-resources of
>> AIDASite, as it is shown above,
>> - to extend Aida way of resolution. URLResolver resolve urls in three
>> levels already and this can be extended:
>> 1. if Url is registered for some object, request is passed to
>> that object. This is normally a domain object which passes
>> it to its App (see Object>>printWebPageFor: session)
>> 2. if not 1 then a static file is tried to be found
>> 3. if not 2 then a so called method resource is searched for
>> Look URLResolver>>ooRefFromURL: for above resolution. In any case the
>> Url will be resolved to a pointer to some object, being domain object,
>> FileProxy or MethodResource, and request will be passed to it. This
>> object will also be registered in main URLResolver table at that time,
>> so that next time the resolution will be direct and fast.
>> To conclude, you can extend resolution in Aida way, which always resolve
>> to some object or in Swazoo way, which resolve to some Resource.
>> I hope I hit your question more or less with that answer...
>> Best regards
> *Nicholas J Moore*
> +33 555 092 140
> +33 682 904 357
> *TSR International
> *Thought Leaders in Communication & Complexity
> Aida mailing list
> Aida na aidaweb.si
Smalltalk Web Application Server
More information about the Aida