[Seaside] updateRoot: Weirdness

Adrian Lienhard adi at netstyle.ch
Wed Jul 18 14:24:36 UTC 2007


Hi Richard,

Why not use Apache as web server for static files?
At least for production, I highly recommend doing so, especially if  
you also serve large files.

Adrian

On Jul 18, 2007, at 15:37 , Richard K Eng wrote:

> FINALLY!!! I found the answer here:
>
> http://inchingforward.blogspot.com/
>
> | ma seaside |
> HttpService allInstancesDo:    [:each | each stop. each unregister].
> WAKom  stop.
> seaside := WAKom  default.
> ma := ModuleAssembly core.
> ma serverRoot: FileDirectory default fullName.
> ma alias: '/seaside' to:    [ma addPlug: [:request | seaside  
> process: request]].
> ma documentRoot: FileDirectory default fullName.
> ma directoryIndex: 'index.html index.htm'.
> ma serveFiles.
> (HttpService startOn: 8080 named: 'httpd') plug: ma rootModule
>
>
> Seems like the configuring of the web server is very arcane and  
> touchy! I'm going to have the above emblazoned on my forehead...  :-)
>
> Regards,
> Richard
>
> ----- Original Message -----
> From: Richard K Eng
> To: Seaside - general discussion
> Sent: Wednesday, July 18, 2007 8:44 AM
> Subject: Re: [Seaside] updateRoot: Weirdness
>
> Okay, here's a further hint as to what's going on...
>
> If I run the code snippet below in my original development image,  
> the stylesheets STOP WORKING! So I think it *is* related somehow to  
> the configuration of the web server. But I don't know how or what's  
> missing. Any ideas?
>
> Thanks.
>
> Regards,
> Richard
>
> ----- Original Message -----
> From: Liliana
> To: 'Seaside - general discussion'
> Sent: Wednesday, July 18, 2007 3:59 AM
> Subject: RE: [Seaside] updateRoot: Weirdness
>
> Hi.
>
> You probably need to enable file serve. You may have enabled it in  
> your old image.
>
> I’ve got this snippet of code from somewhere, possibly Ramon’  
> blog... can’t remember right now...
>
>
>
> "Kill all existing Kom HTTP servers"
>
> "Start a new server servering both static content and seaside apps"
>
> | ma seaside |
>
> HttpService allInstancesDo: [:each | each stop. each unregister].
>
> seaside := WAKom default.
>
> ma := ModuleAssembly core.
>
> ma serverRoot: (FileDirectory default directoryNamed: 'FileRoot')  
> fullName.
>
> ma alias: '/seaside' to: [ma addPlug: [:request | seaside process:  
> request]].
>
> ma documentRoot: (FileDirectory default directoryNamed: 'FileRoot')  
> fullName.
>
> ma directoryIndex: 'index.html index.htm'.
>
> ma serveFiles.
>
> (HttpService startOn: 8080 named: 'httpd') plug: ma rootModule.
>
>
>
> Hope it works
>
> Liliana
>
>
>
>
>
> From: Richard Eng [mailto:richard.eng at rogers.com]
> Sent: 18 July 2007 06:44 AM
> To: Seaside - general discussion
> Subject: Re: [Seaside] updateRoot: Weirdness
>
>
>
> This is totally INSANE!!! No matter what I do, I can’t get  
> stylesheets to work in Seaside.
>
> I even went back to the bare basics...
>
> I took a fresh copy of Squeak 3.9
> I put a fresh copy of Damien’s Seaside 2.7 image into the Squeak  
> directory
> I put the CSS files colour.css and styles.css into the same  
> directory (putting it in the root for simplicity)
> I subclass WAComponent to create GSTemplate
> I create class method #canBeRoot: for GSTemplate
> I create #updateRoot:
> super updateRoot: aRoot.
> aRoot linkToStyle: ‘/colour.css’.
> aRoot linkToStyle: ‘/styles.css’
>
> I create some HTML in #renderContentOn:
> In Seaside config, I create application “NewApp” using GSTemplate
>
> I ought to see the HTML rendered according to the specified  
> stylesheets. What could be simpler?
>
> But it doesn’t work!
>
> And it worked in my original development image! For the life of me,  
> I can’t see ANY difference between the original image and this one.  
> What the hell is going on???
>
> Richard
>
>
> On 7/17/07 6:15 PM, "Richard K Eng" <richard.eng at rogers.com> wrote:
>
> Okay, in my Seaside 2.7 development image, I used updateRoot: to  
> get my app to use CSS files in a particular location (using  
> linkToStyle:). This works fine.
>
> But now I'm trying to create a fresh image and the updateRoot:  
> method is no longer having the intended effect--the CSS files are  
> ignored. I must've "accidentally" got it working in the original  
> image.
>
> So the question is: How do I correctly apply updateRoot: to get my  
> app to use CSS files?
>
> Thanks,
> Richard
>
>
>
> _______________________________________________
> Seaside mailing list
> Seaside at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>
>
> _______________________________________________
> Seaside mailing list
> Seaside at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
> _______________________________________________
> Seaside mailing list
> Seaside at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside



More information about the Seaside mailing list