[Catalyst] 404 Not Found

Octavian Rasnita orasnita at gmail.com
Thu Dec 21 04:05:36 GMT 2006


Hi,

I have made the following controller:

package TranzactiiBursiere::Controller::Bunatati;

use strict;
use warnings;
use base 'Catalyst::Controller';

sub bunatati : General {
    my ( $self, $c ) = @_;
$c->res->body("okokok");
}

1;

I have tried to access:
http://www.domain-name.ro/bunatati

But it just prints a 404 Not Found error.

Instead of "sub bunatati : General {" I have also tried:

sub bunatati : Path {

Normally it should match the namespace, so it should print "okokok" when 
accessing /bunatati.
Why doesn't it work?

I have seen that the following error is printed in the error log:

[Wed Dec 20 19:55:28 2006] [error] [client 127.0.0.1] Negotiation: 
discovered file(s) matching request: E:/web/TranzactiiBursiere/root/bunatati 
(None could be negotiated).

There is a file named bunatati.tt in the /root which is the template file, 
and I don't know why Apache tries to "negociate" it or something like that.

I have renamed that file and now the program doesn't display a 404 Not Found 
Error, but the default action from the Root.pm controller.

Why does it do that? What action should I use in "Bunatati.pm" controller in 
order to have the priority?

Thank you.

Octavian




More information about the Catalyst mailing list