Handling not found

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Handling not found

Torsten Bergmann
Hi,

running a simple seaside demo app using Seaside with Zinc (ZnZincServerAdaptor) and Pharo.
Its available from

  http://localhost:8080/myapp

and (since I changed the default) also on

  http://localhost:8080
 
When entering

  http://localhost:8080/somethingtotallyunknown
 
I get a 'not found' which seems to be handled by default in WAResponseGenerator>>notFound.

I would like to have a nice page when nothing is found. Since it should run standalone
I dont want to catch 404 at the front (apache, nginx) but directly in seaside to redirect
to a nice "You are lost" page.

How can I register an own #responseGenerator that can handle 404?

Thx
T.
_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: Handling not found

jtuchel
Torsten,

haven't done it yet, but looking at WAHtmlResponseGenerator, I guess I'd
start by subclassing it and overriding #notFound.
At least that is where I'd start my experiments. If you need to handle
stuff with a full-blown component, WAdispatcher #handleFiltered:named:  
is probably a better place to start from..

Joachim


Am 18.10.13 08:32, schrieb Torsten Bergmann:

> Hi,
>
> running a simple seaside demo app using Seaside with Zinc (ZnZincServerAdaptor) and Pharo.
> Its available from
>
>    http://localhost:8080/myapp
>
> and (since I changed the default) also on
>
>    http://localhost:8080
>  
> When entering
>
>    http://localhost:8080/somethingtotallyunknown
>  
> I get a 'not found' which seems to be handled by default in WAResponseGenerator>>notFound.
>
> I would like to have a nice page when nothing is found. Since it should run standalone
> I dont want to catch 404 at the front (apache, nginx) but directly in seaside to redirect
> to a nice "You are lost" page.
>
> How can I register an own #responseGenerator that can handle 404?
>
> Thx
> T.
> _______________________________________________
> seaside mailing list
> [hidden email]
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>


--
-- 
----------------------------------------------------------------------- 
Objektfabrik Joachim Tuchel          mailto:[hidden email] 
Fliederweg 1                         http://www.objektfabrik.de
D-71640 Ludwigsburg     http://joachimtuchel.wordpress.com
Telefon: +49 7141 56 10 86 0         Fax: +49 7141 56 10 86 1

_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: Handling not found

Sabine Manaa
Hi Torsten,

I do not show a page-not-found page but redirect the user to the start
site of my app.
Would not this be a better solution?

Greetings
Sabine

On Fri, Oct 18, 2013 at 9:42 AM, jtuchel [via Smalltalk]
<[hidden email]> wrote:

> Torsten,
>
> haven't done it yet, but looking at WAHtmlResponseGenerator, I guess I'd
> start by subclassing it and overriding #notFound.
> At least that is where I'd start my experiments. If you need to handle
> stuff with a full-blown component, WAdispatcher #handleFiltered:named:
> is probably a better place to start from..
>
> Joachim
>
>
> Am 18.10.13 08:32, schrieb Torsten Bergmann:
>
>> Hi,
>>
>> running a simple seaside demo app using Seaside with Zinc
>> (ZnZincServerAdaptor) and Pharo.
>> Its available from
>>
>>    http://localhost:8080/myapp
>>
>> and (since I changed the default) also on
>>
>>    http://localhost:8080
>>
>> When entering
>>
>>    http://localhost:8080/somethingtotallyunknown
>>
>> I get a 'not found' which seems to be handled by default in
>> WAResponseGenerator>>notFound.
>>
>> I would like to have a nice page when nothing is found. Since it should
>> run standalone
>> I dont want to catch 404 at the front (apache, nginx) but directly in
>> seaside to redirect
>> to a nice "You are lost" page.
>>
>> How can I register an own #responseGenerator that can handle 404?
>>
>> Thx
>> T.
>> _______________________________________________
>> seaside mailing list
>> [hidden email]
>> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>>
>
>
> --
> --
-----------------------------------------------------------------------
Objektfabrik
> Joachim Tuchel          mailto:[hidden email] 
Fliederweg 1
> http://www.objektfabrik.de
>
> D-71640 Ludwigsburg     http://joachimtuchel.wordpress.com
> Telefon: +49 7141 56 10 86 0         Fax: +49 7141 56 10 86 1
>
> _______________________________________________
> seaside mailing list
> [hidden email]
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>
>
> ________________________________
> If you reply to this email, your message will be added to the discussion
> below:
> http://forum.world.st/Handling-not-found-tp4715509p4715523.html
> To start a new topic under Seaside General, email
> [hidden email]
> To unsubscribe from Seaside, click here.
> NAML
Reply | Threaded
Open this post in threaded view
|

Re: Handling not found

Philippe Marschall
In reply to this post by Torsten Bergmann
On Fri, Oct 18, 2013 at 8:32 AM, Torsten Bergmann <[hidden email]> wrote:

> Hi,
>
> running a simple seaside demo app using Seaside with Zinc (ZnZincServerAdaptor) and Pharo.
> Its available from
>
>   http://localhost:8080/myapp
>
> and (since I changed the default) also on
>
>   http://localhost:8080
>
> When entering
>
>   http://localhost:8080/somethingtotallyunknown
>
> I get a 'not found' which seems to be handled by default in WAResponseGenerator>>notFound.
>
> I would like to have a nice page when nothing is found. Since it should run standalone
> I dont want to catch 404 at the front (apache, nginx) but directly in seaside to redirect
> to a nice "You are lost" page.
>
> How can I register an own #responseGenerator that can handle 404?

It should be a configured on the default dispatcher or the default
application (depending on which one sends #notFound) like any other
configuration option.

Cheers
Philippe
_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside