[Seaside] Re: [ANN] Indep. SqueakBased web server app sample WAS: static content

Willem van den Ende seaside at willemvandenende.com
Fri Jan 28 11:12:47 CET 2005


On Friday 28 January 2005 07:15, goran.krampe at bluefish.se wrote:
> Hi guys!
> First, Torsten - I have included the fix in my KomHttpServer dev image
> and it will be in the next release of KomHttpServer.
> Second - I may have misunderstood the question and the answer :) but
> KomHttpServer has an example of serving static content, even in the
> description at SM:
> 	http://map1.squeakfoundation.org/sm/packagebyname/komhttpserver
> I assume the question perhaps had to do with how to do this in
> combination with *Seaside* somehow - but anyway.=20

I had the same problem last week, combining static content from komanche wi=
seaside. For some reason the example from komanche SqeuakMap did not work f=
me (I'm not sure if the example code changed recently, I'll assume it=20

Making it work forced me to learn more about how komanche and seaside work,=
I guess this is a good thing - I feel more confident now changing things,=20
both komanche and seaside are powerful and flexible (the seaside config may=
being on the overly flexible side for what I do with it).

Looking back at what is is in squeakMap now, I can see why it didn't work. =
code for starting seaside and komanche is very similar. What I did was try=
the example in SeaSide first:=20

WAKom startOn: 9090.=20

Later on, I tried the example from komanche (HttpService startOn: 8080 name=
'httpd') plug: ma rootModule

That doesn't fully work, since the port number is duplicated in SeaSide and=
Komnanche. If you want to change the port, you'll also have to change the=20
port numer in SeaSide - otherwise URLS are not correctly generated by seasi=
=2D they still contain the previous port number. I did it like this (not su=
if this is the simplest way - it looks kind of messy):

WAGlobalConfiguration instance localConfiguration valueAt: #serverPort put:=

One thing I found handy to do before starting the HttpService on a new port=
was make sure there are no more HttpServices running:

HttpService allInstancesHttpService allInstances
		do: [:httpservice | httpservice unregister].
		do: [:httpservice | httpservice unregister].

It works smoothly now, and I must say developing with SeaSide and Komanche =
really a pleasure :-). So thank you Goran, Avi and others for making this=20
possible :-)=20



> Also, for an approach=20
> of web apps that does NOT use Seaside magic - HttpView is kinda nice
> 	http://map1.squeakfoundation.org/sm/packagebyname/httpview
> HttpView uses the same underlying HTML builder as Seaside does (well,
> they may have diverged now, but I did make an adaptation of HttpView to
> use it a while back) but with extras bolted on.
> regards, G=F6ran
> _______________________________________________
> Seaside mailing list
> Seaside at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/listinfo/seaside

More information about the Seaside mailing list