Hi,<div><br></div><div>finally I&#39;ve managed to serve static files without using an external web server. Indeed I want to have a standalone application that&#39;s why I don&#39;t want to use an external web server.</div>

<div><br></div><div>Here&#39;s how I did, It looks hacky so I&#39;m looking for better code. It was taken from <a href="http://www.shaffer-consulting.com/david/Seaside/GettingSoftware/index.html">http://www.shaffer-consulting.com/david/Seaside/GettingSoftware/index.html</a> with little modifications to make it works.</div>

<meta http-equiv="content-type" content="text/html; charset=utf-8"><div><br></div><div>Object subclass: #SeaslidesServer</div><div>   ....</div><div><br></div><div><div>SeaslidesServer class</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>instanceVariableNames: &#39;adaptor&#39;</div>

</div><div><br></div><div><br></div><div><br></div><div><div>SeaslidesServer class&gt;&gt;startSeaslides</div><div>  | ma seaside |</div><div><br></div><div>  &quot;Kill all existing Kom HTTP servers&quot;</div><div>  HttpService allInstancesDo: [:each | each stop. each unregister].</div>

<div><br></div><div>  adaptor := (WAKom startOn: 8080).</div><div><br></div><div>  ma := ModuleAssembly core.</div><div>  ma serverRoot: (FileDirectory default directoryNamed: &#39;Bespin&#39;) fullName.</div><div>  ma alias: &#39;/seaslides&#39; to: [ma addPlug: [:request | self processHttpRequest: request]].</div>

<div>  ma alias: &#39;/files&#39; to: [ma addPlug: [:request | self processHttpRequest: request]].</div><div>  ma documentRoot: (FileDirectory default directoryNamed: &#39;Bespin&#39;) fullName.</div><div>  ma directoryIndex: &#39;index.html index.htm&#39;.</div>

<div>  ma serveFiles.</div><div><br></div><div>  adaptor service plug: ma rootModule.</div></div><div><br></div><div><br></div><div><br></div><div><div>SeaslidesServer class&gt;&gt;processHttpRequest: aRequest</div><div>
<span class="Apple-tab-span" style="white-space:pre">        </span>^ self adaptor process: aRequest</div>
</div><div><br></div><div><br></div><div>The directory Bespin is at the same level at the Seaside image. So I can access <a href="http://localhost:8080/BespinEmbedded.js">http://localhost:8080/BespinEmbedded.js</a> and all other ressources.</div>

<div><br></div><a href="http://localhost:8080/seaslides">http://localhost:8080/seaslides</a> is my application. <a href="http://localhost:8080/files">http://localhost:8080/files</a> is needed for Seaside libraires.<div><br>

</div><div>Cheers,<br><div><br clear="all">Laurent Laffont<br><br><a href="http://pharocasts.blogspot.com/">http://pharocasts.blogspot.com/</a><br><a href="http://magaloma.blogspot.com/">http://magaloma.blogspot.com/</a><br>


<br><br><div class="gmail_quote">On Sat, Sep 11, 2010 at 9:47 AM, Philippe Marschall <span dir="ltr">&lt;<a href="mailto:philippe.marschall@gmail.com">philippe.marschall@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;">

2010/9/11 laurent laffont &lt;<a href="mailto:laurent.laffont@gmail.com">laurent.laffont@gmail.com</a>&gt;:<br>
<div><div></div><div class="h5">&gt; Hi,<br>
&gt; I&#39;m trying to create a WAFileLibrary subclass and import Bespin<br>
&gt; Embedded. <a href="https://bespin.mozillalabs.com/docs/embedding/index.html" target="_blank">https://bespin.mozillalabs.com/docs/embedding/index.html</a><br>
&gt; However, Bespin expects this file hierarchy to work:<br>
&gt; ressources/<br>
&gt;     -- screen_theme/<br>
&gt;            -- theme.less<br>
&gt;            -- images<br>
&gt;                 lines.png<br>
&gt;                 ....<br>
&gt; With WAFileLibrary the path to files is built using the class name.<br>
&gt;<br>
&gt; Is there a way to choose the directory name for a WAFileLibrary ? So I can<br>
&gt; access theme.less like this:<br>
&gt; <a href="http://localhost:8080/BespinLibrary/ressources/screen_theme/theme.less" target="_blank">http://localhost:8080/BespinLibrary/ressources/screen_theme/theme.less</a><br>
&gt; I know I can serve static filesusing an external Web server but I really<br>
&gt; want to put this in the image. (Or, if possible, serve static files<br>
&gt; via KomHttpServer or another Web server running on another port).<br>
&gt; Laurent Laffont<br>
<br>
</div></div>The easiest is probably to create a file handler named &#39;resources&#39; and<br>
override #name in your file library to answer &#39;screen_theme&#39;.<br>
<br>
Cheers<br>
Philippe<br>
_______________________________________________<br>
seaside mailing list<br>
<a href="mailto:seaside@lists.squeakfoundation.org">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>
</blockquote></div><br></div></div>