FWIW, as Johan pointed out, files can be served easily by creating a request handler of type File Directory from the config page. I didn&#39;t find this though, because the Seaside-FileSystem package is not included in the <meta http-equiv="content-type" content="text/html; charset=utf-8">Seaside 3.0 One-Click Experience distribution. I evaluated<div>
<br></div><div><div>Gofer new</div><div>    squeaksource: &#39;MetacelloRepository&#39;;</div><div>    package: &#39;ConfigurationOfSeaside30&#39;;</div><div>    load.</div><div>(Smalltalk at: #ConfigurationOfSeaside30) load.</div>
<div><br></div><div>and it magically appeared.</div><div><br></div><div>Is there a reason why some packages are  not present in the One-Click Experience? Should I shun the One-Click Experience and do manual installations from now on?</div>
<div><br></div><div>TF</div><br><div class="gmail_quote">On Tue, Oct 26, 2010 at 12:20 PM, Tony Fleig <span dir="ltr">&lt;<a href="mailto:tony.fleig@gmail.com">tony.fleig@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
My aim is not to improve performance or manage image memory but to improve ease of installation and maintenance during development. I want to avoid repeatedly editing large CSS files and installing and configuring Apache during development.<div>

<br></div><div>When deployed, I would imagine that the static files would be served by an appropriately configured Apache server as this seems to be the recommended approach.</div><div><br></div><div>That said, wouldn&#39;t it be possible for me to cache the files when they were accessed the first time and avoid the file I/O after that? It seems to me that the effect then would be image-resident files essentially equivalent to WAFileLibrary but without the need to pre-load the files, mangle the file names, change cross-file references, and destroy any directory hierarchy that might have existed. </div>

<div><br></div><div>TF<br><div><br></div><div><div><div></div><div class="h5"><br><div class="gmail_quote">On Tue, Oct 26, 2010 at 12:05 PM, John McKeon <span dir="ltr">&lt;<a href="mailto:p3anoman@gmail.com" target="_blank">p3anoman@gmail.com</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div>Please correct me if I am wrong, but this still serves the files through the image, only now you are imposing the overhead of first reading the file from the hard drive. This will slow things down, not speed them up, but perhaps your aim is to conserve RAM used by the image? (But of course, loading the files into the image will temporarily increase in-memory image size, and since every request will create load its own set of files from the hard drive, this could drive memory usage way up depending on how many requests are being served.</div>



<div>Am I interpreting this correctly?</div>
<div> </div>
<div>John<br><br></div>
<div class="gmail_quote"><div><div></div><div>On Tue, Oct 26, 2010 at 1:16 PM, Tony Fleig <span dir="ltr">&lt;<a href="mailto:tony.fleig@gmail.com" target="_blank">tony.fleig@gmail.com</a>&gt;</span> wrote:<br>

</div></div><blockquote style="border-left:#ccc 1px solid;margin:0px 0px 0px 0.8ex;padding-left:1ex" class="gmail_quote"><div><div></div><div>I want to serve CSS and Javascript files from an on-disk directory (i.e. not using WAFileLibrary) and also not using Apache. 
<div><br></div>
<div>I have JQuery CSS files that reference a large number of image files from an images subdirectory. When these files are imported into a WAFileLibrary, the image filenames are changed and of course there are no subdirectories. Changing the original css file to accommodate this is not practical as I expect to receive new ones periodically and then would have to do it all over again.</div>



<div><br></div>
<div>I am attracted by the easy deployment of Seaside apps when Apache is not involved and for the few files involved it doesn&#39;t seem to me that Apache is warranted, especially during development of the site.</div>
<div><br></div>
<div>I could find no information on the right way to do this, so I subclassed WAServerAdaptor as shown below.</div>
<div><br></div>
<div>With these modifications, If the URL received from the browser&#39;s path begins with /static, then files are served from a specified directory. Otherwise, the request is passed on (eventually) to WADispatcher as normal.</div>



<div><br></div>
<div>This works for me, but I have no idea as to whether there is an easier or better way or if there is a feature to allow this that I just did not find.</div>
<div><br></div>
<div>I am coming back to Smalltalk after many years and I am definitely a bit rusty, so any criticism of the code will also be greatly appreciated.</div>
<div><br></div>
<div>Regards,</div>
<div>TF</div>
<div><br></div>
<div><br></div>
<div>
<div>&#39;From Pharo1.1 of 17 July 2010 [Latest update: #11411] on 26 October 2010 at 10:08:40 am&#39;!</div>
<div>WAComancheAdaptor subclass: #TFComancheAdaptor</div>
<div><span style="white-space:pre-wrap"></span>instanceVariableNames: &#39;staticDirectory staticPathPart&#39;</div>
<div><span style="white-space:pre-wrap"></span>classVariableNames: &#39;&#39;</div>
<div><span style="white-space:pre-wrap"></span>poolDictionaries: &#39;&#39;</div>
<div><span style="white-space:pre-wrap"></span>category: &#39;TFStuff&#39;!</div>
<div><br></div>
<div>!TFComancheAdaptor methodsFor: &#39;as yet unclassified&#39; stamp: &#39;TF 10/26/2010 08:58&#39;!</div>
<div>defaultStaticDirectory</div>
<div><span style="white-space:pre-wrap"></span>^ FileDirectory default pathName! !</div>
<div><br></div>
<div>!TFComancheAdaptor methodsFor: &#39;as yet unclassified&#39; stamp: &#39;TF 10/26/2010 08:59&#39;!</div>
<div>defaultStaticPathPart</div>
<div><br></div>
<div><span style="white-space:pre-wrap"></span>^ &#39;static&#39;! !</div>
<div><br></div>
<div>!TFComancheAdaptor methodsFor: &#39;as yet unclassified&#39; stamp: &#39;TF 10/26/2010 09:55&#39;!</div>
<div>process: aNativeRequest</div>
<div><span style="white-space:pre-wrap"></span>&quot;Serve static files from a specified directory if the URL path begins with a specified name.</div>
<div><span style="white-space:pre-wrap"></span></div>
<div><span style="white-space:pre-wrap"></span>The default staticDirectory is the current directory (nominally the Seaside resources directory)</div>
<div><span style="white-space:pre-wrap"></span>and the default static path part is &#39;static&#39;. Thus, if the client requests</div>
<div><span style="white-space:pre-wrap"></span>&#39;<a href="http://localhost:8080/static/css/xyz.css" target="_blank">http://localhost:8080/static/css/xyz.css</a>&#39; and the Seaside resources directory is</div>
<div><span style="white-space:pre-wrap"></span>&#39;/home/user1/Seaside.app/Contents/Resources&#39;, the file returned will be</div>
<div><span style="white-space:pre-wrap"></span>&#39;/home/user1/Seaside.app/Contents/Resources/static/css/xyz.css&#39;.</div>
<div><span style="white-space:pre-wrap"></span></div>
<div><span style="white-space:pre-wrap"></span>Requests whose path does not begin with the static path part are unaffected, i.e. they are</div>
<div><span style="white-space:pre-wrap"></span>processed by the WAComancheAdapter as normal.&quot;</div>
<div><br></div>
<div><span style="white-space:pre-wrap"></span>| context pathParts fullFilePath method response |</div>
<div><span style="white-space:pre-wrap"></span>pathParts := aNativeRequest pathParts.</div>
<div><span style="white-space:pre-wrap"></span>pathParts size &gt; 1 ifTrue: [</div>
<div><span style="white-space:pre-wrap"></span>(pathParts at: 1) = self staticPathPart ifTrue: [</div>
<div><span style="white-space:pre-wrap"></span>method := aNativeRequest method.</div>
<div><span style="white-space:pre-wrap"></span>(#(#GET #POST) includes: method) ifFalse: [^nil].</div>
<div><span style="white-space:pre-wrap"></span>fullFilePath := self staticDirectory,aNativeRequest url. </div>
<div><span style="white-space:pre-wrap"></span>(FileStream isAFileNamed: fullFilePath) ifFalse: [^nil].</div>
<div><span style="white-space:pre-wrap"></span>^HttpResponse </div>
<div><span style="white-space:pre-wrap"></span>fromStream: (StandardFileStream readOnlyFileNamed: fullFilePath).</div>
<div><span style="white-space:pre-wrap"></span>]<span style="white-space:pre-wrap"> </span></div>
<div><span style="white-space:pre-wrap"></span>] .</div>
<div><br></div>
<div><span style="white-space:pre-wrap"></span>^ self processResponse: (super process: aNativeRequest)</div>
<div>! !</div>
<div><br></div>
<div>!TFComancheAdaptor methodsFor: &#39;as yet unclassified&#39; stamp: &#39;TF 10/26/2010 09:54&#39;!</div>
<div>processResponse: aResponse</div>
<div><br></div>
<div><span style="white-space:pre-wrap"></span>&quot;Ensures that we get the HttpAdaptor&#39;s standard notFound error</div>
<div><span style="white-space:pre-wrap"></span>return, rather than the one line of text/plain that is returned by WADispatcher.&quot;<span style="white-space:pre-wrap"> </span></div>
<div><span style="white-space:pre-wrap"></span></div>
<div><span style="white-space:pre-wrap"></span>aResponse status = #notFound</div>
<div><span style="white-space:pre-wrap"></span>ifTrue: [ ^nil ]</div>
<div><span style="white-space:pre-wrap"></span>ifFalse: [^aResponse]</div>
<div>! !</div>
<div><br></div>
<div>!TFComancheAdaptor methodsFor: &#39;as yet unclassified&#39; stamp: &#39;TF 10/26/2010 08:52&#39;!</div>
<div>staticDirectory</div>
<div><br></div>
<div><span style="white-space:pre-wrap"></span>staticDirectory isNil ifTrue: [ staticDirectory := self defaultStaticDirectory ].</div>
<div><span style="white-space:pre-wrap"></span>^ staticDirectory! !</div>
<div><br></div>
<div>!TFComancheAdaptor methodsFor: &#39;as yet unclassified&#39; stamp: &#39;TF 10/26/2010 08:57&#39;!</div>
<div>staticPathPart</div>
<div><span style="white-space:pre-wrap"></span></div>
<div><span style="white-space:pre-wrap"></span>staticPathPart isNil ifTrue: [ staticPathPart := self defaultStaticPathPart ].</div>
<div><span style="white-space:pre-wrap"></span>^ staticPathPart! !</div></div>
<div><br></div><br></div></div>_______________________________________________<br>seaside mailing list<br><a href="mailto:seaside@lists.squeakfoundation.org" target="_blank">seaside@lists.squeakfoundation.org</a><br><a href="http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside" target="_blank">http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside</a><br>


<br></blockquote></div><font color="#888888"><br><br clear="all"><br>-- <br><a href="http://john-mckeon.us/" target="_blank">http://john-mckeon.us</a><br>
</font><br>_______________________________________________<br>
seaside mailing list<br>
<a href="mailto:seaside@lists.squeakfoundation.org" target="_blank">seaside@lists.squeakfoundation.org</a><br>
<a href="http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside" target="_blank">http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside</a><br>
<br></blockquote></div><br><br clear="all"><br>-- <br></div></div>P1 SYSTEMS INCORPORATED<br>1425 Broadway #320, Seattle, WA 94122<br><br>Email:         <a href="mailto:info@p1.com" target="_blank">info@p1.com</a><br>FAX:          +1 206 374-2475<br>

Web:          <a href="http://www.p1.com/" target="_blank">http://www.p1.com/</a><br>Voicemail:   +1 206 374-2475<br><br>The information contained in this message (including attachments) may be privileged and confidential and protected from disclosure. It is the property of P1 Systems Incorporated.  If the reader of this message is not the intended recipient, or an employee or agent responsible for delivering this message to the intended recipient, you are hereby notified that any review, dissemination, distribution or copying of this communication is strictly prohibited.  If you have received this communication in error, please notify us immediately by replying to the message, destroying all copies and deleting it from your computer.<br>


</div></div>
</blockquote></div><br></div>