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