[Tbnl-devel] [hunchentoot-devel] 404 page

Patrick May patrick.may at mac.com
Thu May 8 13:07:53 UTC 2014


Hans,

	That would be “debugging by public embarrassment” in action.  ;-)

	Removing the incorrect eql specialization still doesn’t result in my 404 page being displayed.  Do I have to subclass acceptor to get it to work?

Thanks,

Patrick

On May 8, 2014, at 2:28 AM, Hans Hübner <hans.huebner at gmail.com> wrote:

> 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/f14d81d9/attachment.html>


More information about the Tbnl-devel mailing list