[Tbnl-devel] [hunchentoot-devel] 404 page
Hans Hübner
hans.huebner at gmail.com
Thu May 8 06:28:53 UTC 2014
Patrick,
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)?
-Hans
2014-05-07 23:15 GMT+02:00 Patrick May <patrick.may at mac.com>:
> Dredging up an old question....
>
> On this machine I don't have the code I used the last time I asked this
> question. I tried this:
>
> (defmethod acceptor-status-message ((acceptor (eql *test-acceptor*))
> (http-status-code (eql 404)))
> (display-404-page))
>
> but it doesn't display my own 404 page. What Hunchentoot concept am I
> missing?
>
> Thanks,
>
> Patrick
>
>
> On May 31, 2012, at 3:24 PM, Hans Hübner <hans.huebner at gmail.com> wrote:
>
> On Thu, May 31, 2012 at 8:12 PM, Patrick May <patrick.may at mac.com> wrote:
> 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?
>
> This is actually documented, albeit maybe a bit hard to find:
> http://weitz.de/hunchentoot/#acceptor-status-message - I'd gladly
> accept a documentation patch that puts some prose describing how to
> customize error pages into a separate chapter.
>
> With no further customization, the error page templates are located in the
> www/errors/ subdirectory of the Hunchentoot source distribution.
>
> Let me know if you have further questions.
>
> -Hans
>
> _______________________________________________
> tbnl-devel site list
> tbnl-devel at common-lisp.net
> http://common-lisp.net/mailman/listinfo/tbnl-devel
>
>
>
> _______________________________________________
> Tbnl-devel mailing list
> Tbnl-devel at common-lisp.net
> http://common-lisp.net/cgi-bin/mailman/listinfo/tbnl-devel
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.common-lisp.net/pipermail/tbnl-devel/attachments/20140508/0e6b77bb/attachment.html>
More information about the Tbnl-devel
mailing list