[Seaside] static image files

David Shaffer cdshaffer at acm.org
Sun Feb 26 19:43:12 UTC 2006

Brad Fuller wrote:

>>The Resource Base URL
>>configuration stuff is Seaside-related and has nothing to do with Kom. 
>Can you tell me what Resource Base is? Or point me to a place to find
>out more about the /seaside/config page?
>I've read your link to Avi's email in your tutorial.
It was added in 2.6 so I don't know much about it.  A quick browse
through the various senders etc makes me think that it works as you
expect.  You set it on the configuration page then when you want to
specify an image (for example) relative to this base you simply send
"resourceUrl: someRelativePath" and the canvas code will generate an
absolute URL.  Look for senders of absoluteUrlForResource: to see a list
of tags which seem to use this feature.  Notice that the scripts and
styles paths seemed tied to this as well.  I think this follows pretty
standard usage pattern.  I would set the resource base to
"http://localhost:9090/myFiles" then inside the directory served by
myFiles place directories for your scripts, styles and images.  Then you

html image
    resourceUrl: 'images/whatever'

The alternative is to roll your own configuration stuff.  If you want to
see how that would work look at my tutorial on configurations (which
will not work in 2.6 w/o a couple small changes) then for a specific
example look at WARenderLoopConfiguration>>attributes to see how
#baseResourceUrl was defined.


>BTW, your tutorial is very helpful. Thanks! I'm looking forward to the
>other areas when finished!
>I'll check out Squelenium.

Thanks Brad.  I wish I could work on it more...it really needs a lot of
work (like moving to Canvas, finishing incomplete sections etc).  I do
have new material but there are some large problems with it...should be
ironed out in the next month or so though.

>that's what I ended up doing for audio files for people to dnl/listen
>to. But, I gave the complete URL for the anchor. It would be better if
>there was a way to set a path and then use a relative URL, though. Is there?
(See above.)  You could, of course, change the baseResourceUrl to point
to your apache-served content in the deployed environment.  This is
exactly what I do (although I don't use 2.6 so I have my own
configuration parameters).


More information about the Seaside mailing list