web-server uses mred<br><br>web-server-text uses mzscheme<br><br>When the web-server loads a servlet, it loads it in a new namespace. The server must copy in certain modules, such as mzscheme, (lib &quot;servlet.ss&quot; &quot;web-server&quot;), etc. Before it did not detect if it was loaded with mred or mzscheme and never copied in (lib &quot;
mred.ss&quot; &quot;mred&quot;). Now it does.<br><br>Jay<br><br><div><span class="gmail_quote">On 4/8/06, <b class="gmail_sendername">Robby Findler</b> &lt;<a href="mailto:robby@cs.uchicago.edu">robby@cs.uchicago.edu</a>&gt; wrote:
</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">That error message suggests that the web server is using mzscheme to<br>start, not mred.
<br><br>Robby<br><br>At Sat, 8 Apr 2006 12:57:42 -0700 (PDT), Danny Yoo wrote:<br>&gt; &gt; Using the plt web-server, I would like for users to be able to upload an<br>&gt; &gt; image file to the server, then I would resize the image to fit the
<br>&gt; &gt; required dimensions for the site. Now AFAIK, the only way I can process<br>&gt; &gt; an image is using the bitmap% object which is available only with MrEd.<br>&gt; &gt; The docs for the web-server state that &quot;Servlets can use the full MrEd
<br>&gt; &gt; functionality&quot; when started with the command &quot;web-server&quot;. But when I do<br>&gt; &gt; this, and try to make a button% object, I get reference to undefined<br>&gt; &gt; identifier errors.<br>&gt; &gt;
<br>&gt; &gt; Can anyone help me with what I'm doing wrong? I'm using PLT version 301.<br>&gt;<br>&gt;<br>&gt; Hi Eric,<br>&gt;<br>&gt; Ok, I can duplicate your problem with module-based servlets.<br>&gt;<br>&gt; Here's the sample servlet I'm testing, and the error message I see.&nbsp;&nbsp;I
<br>&gt; haven't investigated this yet, but hope that this will help others figure<br>&gt; out what's going on.&nbsp;&nbsp;(I have go to lunch right now!&nbsp;&nbsp;*grin*)<br>&gt;<br>&gt; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;<br>&gt; (module test mzscheme
<br>&gt;&nbsp;&nbsp; (require (lib &quot;mred.ss&quot; &quot;mred&quot;))<br>&gt;&nbsp;&nbsp; (provide interface-version timeout start)<br>&gt;&nbsp;&nbsp; (define interface-version 'v1)<br>&gt;&nbsp;&nbsp; (define timeout +inf.0)<br>&gt;&nbsp;&nbsp; (define (start initial-request)
<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; (list #&quot;text/plain&quot;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (format &quot;~a&quot; button%))))<br>&gt; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;<br>&gt;<br>&gt;<br>&gt; I get a 500 with the following error:<br>&gt;<br>
&gt; ---------------------------------------------------------------------------<br>&gt; Servlet didn't load.<br>&gt; dynamic-require: unknown module: #%mred-kernel<br>&gt;<br>&gt;&nbsp;&nbsp;=== context ===<br>&gt; /export/home/dyoo/local/plt/collects/web-server/dispatch-
servlets.ss:285:4:<br>&gt; lo<br>&gt; ad-servlet/path<br>&gt; /export/home/dyoo/local/plt/collects/web-server/dispatch-servlets.ss:268:4:<br>&gt; re<br>&gt; load-servlet-script<br>&gt; /export/home/dyoo/local/plt/collects/web-server/cache-
table.ss:38:46<br>&gt; /export/home/dyoo/local/plt/collects/web-server/cache-table.ss:38:46<br>&gt; /export/home/dyoo/local/plt/collects/web-server/cache-table.ss:30:13<br>&gt; cache-table-lookup!<br>&gt; cache-table-lookup!
<br>&gt; body<br>&gt; /export/home/dyoo/local/plt/collects/web-server/dispatch-servlets.ss:59:4:<br>&gt; ser<br>&gt; vlet-content-producer/path<br>&gt; /export/home/dyoo/local/plt/collects/web-server/dispatch-sequencer.ss
:9:4:<br>&gt; loo<br>&gt; p<br>&gt; loop<br>&gt; loop<br>&gt; loop<br>&gt; /export/home/dyoo/local/plt/collects/web-server/web-server-unit.ss:105:8:<br>&gt; conn<br>&gt; ection-loop<br>&gt; /export/home/dyoo/local/plt/collects/web-server/web-
server-unit.ss:93:<br>&gt; --------------------------------------------------------------------------<br>&gt;<br>&gt; _________________________________________________<br>&gt;&nbsp;&nbsp; For list-related administrative tasks:<br>&gt;&nbsp;&nbsp; 
<a href="http://list.cs.brown.edu/mailman/listinfo/plt-scheme">http://list.cs.brown.edu/mailman/listinfo/plt-scheme</a><br>_________________________________________________<br>&nbsp;&nbsp;For list-related administrative tasks:<br>&nbsp;&nbsp;
<a href="http://list.cs.brown.edu/mailman/listinfo/plt-scheme">http://list.cs.brown.edu/mailman/listinfo/plt-scheme</a><br></blockquote></div><br><br clear="all"><br>-- <br>Jay McCarthy &lt;<a href="mailto:jay@cs.brown.edu">
jay@cs.brown.edu</a>&gt;<br><a href="http://jay.makeoutcity.com/">http://jay.makeoutcity.com/</a>