cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ugo Cei <>
Subject Generating a 404 Not Found
Date Tue, 08 Oct 2002 07:11:20 GMT
[I posted this message on cocoon-users two days ago, but got no reply. I 
hope you don't mind if I "escalate" this ;-)]

Hi people,

let's say you have a website with an administrative section that is 
protected using the Authentication Framework:

<map:match pattern="admin/**">

   <map:act type="auth-protect">
     <map:parameter name="handler" value="authhandler"/>

     <map:match pattern="admin/newuser">

     <map:match pattern="admin/deluser">

     <!-- more matchers here -->


      - if the user is not authenticated,
      - redirect him to the login page
   <map:redirect-to uri="login"/>


The problem here is that when someone requests an URI like 
"admin/this-uri-does-not-match-anything", they are redirected to the 
login page. I'd like to generate a "404 Not Found" result code instead, 
and possibly have it trapped by the map:handle-errors block.

I'm using C2.1-dev and I see there's a NotifyingGenerator, but I cannot 
figure out whether it would be useful in this case and how to use it.

Any hints?



Ugo Cei -

To unsubscribe, e-mail:
For additional commands, email:

View raw message