<div dir="ltr">Patrick,<div><br></div><div>you cannot specialize a generic function on the run-time value of a variable. In your method definition, you are trying to specialize the ACCEPTOR argument on (EQL *TEST-ACCEPTOR*)), but *TEST-ACCEPTOR* in that definition will be evaluated at compile-time, not at run-time. Thus, you're probably specializing on NIL or some other random object. Is there any reason why you want to specialize on a particular instance rather than the class of the acceptor (or T)?</div>
<div><br></div><div>-Hans</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">2014-05-07 23:15 GMT+02:00 Patrick May <span dir="ltr"><<a href="mailto:patrick.may@mac.com" target="_blank">patrick.may@mac.com</a>></span>:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><span style="white-space:pre-wrap"> </span>Dredging up an old question….<br><br><span style="white-space:pre-wrap"> </span>On this machine I don’t have the code I used the last time I asked this question. I tried this:<br>
<br><font face="Consolas">(defmethod acceptor-status-message ((acceptor (eql *test-acceptor*))<br> (http-status-code (eql 404)))<br> (display-404-page))<br></font><br>but it doesn’t display my own 404 page. What Hunchentoot concept am I missing?<div>
<br></div><div>Thanks,</div><div><br></div><div>Patrick</div><div><div><div class="h5"><br><br>On May 31, 2012, at 3:24 PM, Hans Hübner <<a href="mailto:hans.huebner@gmail.com" target="_blank">hans.huebner@gmail.com</a>> wrote:<br>
<br></div></div><blockquote type="cite"><div><div class="h5">On Thu, May 31, 2012 at 8:12 PM, Patrick May <<a href="mailto:patrick.may@mac.com" target="_blank">patrick.may@mac.com</a>> wrote:<br> I'm sure I'm overlooking something simple in the documentation, but I've Googled madly and not found the answer. How do I specify my own 404 page in Hunchentoot?<br>
<br>This is actually documented, albeit maybe a bit hard to find: <a href="http://weitz.de/hunchentoot/#acceptor-status-message" target="_blank">http://weitz.de/hunchentoot/#acceptor-status-message</a> - I'd gladly accept a documentation patch that puts some prose describing how to customize error pages into a separate chapter.<br>
<br>With no further customization, the error page templates are located in the www/errors/ subdirectory of the Hunchentoot source distribution.<br><br>Let me know if you have further questions.<br><br>-Hans<br><br></div>
</div>
<div class="">_______________________________________________<br>tbnl-devel site list<br><a href="mailto:tbnl-devel@common-lisp.net" target="_blank">tbnl-devel@common-lisp.net</a><br><a href="http://common-lisp.net/mailman/listinfo/tbnl-devel" target="_blank">http://common-lisp.net/mailman/listinfo/tbnl-devel</a><br>
</div></blockquote><br></div></div><br>_______________________________________________<br>
Tbnl-devel mailing list<br>
<a href="mailto:Tbnl-devel@common-lisp.net">Tbnl-devel@common-lisp.net</a><br>
<a href="http://common-lisp.net/cgi-bin/mailman/listinfo/tbnl-devel" target="_blank">http://common-lisp.net/cgi-bin/mailman/listinfo/tbnl-devel</a><br>
<br></blockquote></div><br></div>