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

Jason Rogers jacaetevha at gmail.com
Fri Jan 28 14:33:43 CET 2005


Well, a thousand thanks to everyone!  I have a lot to go on here.


On Fri, 28 Jan 2005 11:12:47 +0100, Willem van den Ende
<seaside at willemvandenende.com> wrote:
> Hi!
> 
> 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.
> 
> I had the same problem last week, combining static content from komanche with
> seaside. For some reason the example from komanche SqeuakMap did not work for
> me (I'm not sure if the example code changed recently, I'll assume it
> didn't).
> 
> Making it work forced me to learn more about how komanche and seaside work, so
> I guess this is a good thing - I feel more confident now changing things,
> both komanche and seaside are powerful and flexible (the seaside config maybe
> 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. My
> code for starting seaside and komanche is very similar. What I did was try
> the example in SeaSide first:
> 
> WAKom startOn: 9090.
> 
> Later on, I tried the example from komanche (HttpService startOn: 8080 named:
> '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
> port numer in SeaSide - otherwise URLS are not correctly generated by seaside
> - they still contain the previous port number. I did it like this (not sure
> if this is the simplest way - it looks kind of messy):
> 
> WAGlobalConfiguration instance localConfiguration valueAt: #serverPort put:
> 8080.
> 
> 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 is
> really a pleasure :-). So thank you Goran, Avi and others for making this
> possible :-)
> 
> cheers,
> 
> Willem.
> 
> 
> > Also, for an approach
> > of web apps that does NOT use Seaside magic - HttpView is kinda nice
> > IMHO:
> >
> >       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�ran
> > _______________________________________________
> > Seaside mailing list
> > Seaside at lists.squeakfoundation.org
> > http://lists.squeakfoundation.org/listinfo/seaside
> 
> _______________________________________________
> Seaside mailing list
> Seaside at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/listinfo/seaside
> 


-- 
Jason Rogers

"I am crucified with Christ: nevertheless I live; yet not I,
but Christ liveth in me: and the life which I now live in 
the flesh I live by the faith of the Son of God, who loved 
me, and gave himself for me."
    Galatians 2:20


More information about the Seaside mailing list