[Catalyst-dev] help serving static content

J. Emmanuel Enrique Delgado Lara larin.s931 at gmail.com
Wed Oct 19 20:14:03 CEST 2005


I'm having troubles trying to serve static content, i see just a black
screen when a request it's made actually the app has a static controller to
serve the static content, it looks like this:

sub default : Path('/static') {
my ( $self, $c ) = @_;
if ($c->req->path =~ /css$/i) {
$c->serve_static( "text/css" );
}else{
$c->serve_static;
}
}

sub favicon : Path('/favicon.ico') {
my ( $self, $c ) = @_;
$c->serve_static;
}

And a end action like this:

sub default : Private {
my ( $self, $c ) = @_;
$c->stash->{template} = "index.mas";
}
37 sub end : Private {
my ( $self, $c ) = @_;
my $handled = $c->res->output || $c->res->redirect;
$c->forward('minisurem::V::MV') unless $handled;
}

This is the log:
1 [Wed Oct 19 13:01:08 2005] [catalyst] [debug] Debug messages enabled
2 [Wed Oct 19 13:01:08 2005] [catalyst] [debug] Loaded plugins:
3
.=----------------------------------------------------------------------------=.
4 | Catalyst::Plugin::Static |
5
'=----------------------------------------------------------------------------='
6
7 [Wed Oct 19 13:01:08 2005] [catalyst] [debug] Loaded dispatcher
"Catalyst::Dispatcher"
8 [Wed Oct 19 13:01:08 2005] [catalyst] [debug] Loaded engine
"Catalyst::Engine::HTTP"
9 [Wed Oct 19 13:01:08 2005] [catalyst] [debug] Found home
"/home/larin/testing/catalyst/minisurem"
10 [Wed Oct 19 13:01:08 2005] [catalyst] [debug] Loaded components:
11
.=----------------------------------------------------------------------------=.
12 | minisurem::C::static |
13 | minisurem::V::MV |
14
'=----------------------------------------------------------------------------='
15
16 [Wed Oct 19 13:01:08 2005] [catalyst] [debug] Loaded private actions:
17
.=-------------------------------------+--------------------------------------=.
18 | Private | Class |
19
|=-------------------------------------+--------------------------------------=|
20 | /default | minisurem |
21 | /end | minisurem |
22 | /static/favicon | minisurem::C::static |
23 | /static/default | minisurem::C::static |
24
'=-------------------------------------+--------------------------------------='
25
26 [Wed Oct 19 13:01:08 2005] [catalyst] [debug] Loaded public actions:
27
.=-------------------------------------+--------------------------------------=.
28 | Public | Private |
29
|=-------------------------------------+--------------------------------------=|
30 | /favicon.ico | /static/favicon |
31 | /static | /static/default |
32
'=-------------------------------------+--------------------------------------='
33
34 [Wed Oct 19 13:01:08 2005] [catalyst] [info] minisurem powered by
Catalyst 5.30
35 [Wed Oct 19 13:01:20 2005] [catalyst] [debug]
**********************************
36 [Wed Oct 19 13:01:20 2005] [catalyst] [debug] * Request 1 (0.083/s)
[16958]
37 [Wed Oct 19 13:01:20 2005] [catalyst] [debug]
**********************************
38 [Wed Oct 19 13:01:20 2005] [catalyst] [debug] "GET" request for "" from
127.0.0.1 <http://127.0.0.1>
39 [Wed Oct 19 13:01:20 2005] [catalyst] [debug] Rendering component
"/index.mas"
40 [Wed Oct 19 13:01:20 2005] [catalyst] [info] Request took 0.010433s (
95.850/s)
41
.=-----------------------------------------------------------------+----------=.
42 | Action | Time |
43
|=-----------------------------------------------------------------+----------=|
44 | /default | 0.000051s |
45 | -> minisurem::V::MV->process | 0.003560s |
46 | /end | 0.003903s |
47
'=-----------------------------------------------------------------+----------='
48


Hope somebody can help me thanks



emmanuel delgado
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.rawmode.org/pipermail/catalyst-dev/attachments/20051019/2efc2ff4/attachment.htm


More information about the Catalyst-dev mailing list