FAQ
Hello!

I have

a) JavaScript files (*.js) and
b) images,

which I want to use with catalyst.

Where should I put them in order to be able to use it?

If I put, for instance, a JavaScript file into "root\src\categories"
(root\src\categories\myJavaScript.js) and then access the file via
localhost:3000/categories/myJavaScript.js (from within a tt2 file) it
doesn't work because Catalyst thinks that myJavaScript.js is an
action.

TIA

Dmitri Pissarenko

Search Discussions

  • Tobias Kremer at May 6, 2007 at 5:23 pm
    Hi Dmitri,
    I have
    a) JavaScript files (*.js) and
    b) images,
    which I want to use with catalyst.
    Where should I put them in order to be able to use it?
    Take a look at the Static::Simple plugin which is enabled
    by default:

    http://search.cpan.org/dist/Catalyst-Plugin-Static-Simple/

    By default, files under /root/static are served as static
    content but you may as well define certain file extensions
    (e.g. .js) to be served as static files AFAIK.

    HTH,

    --Tobias

    _______________________________________/\____ _ . .
    + web ::::::: http://www.funkreich.de
    + last.fm ::: http://www.last.fm/user/soulchild77
    ----------------------------------------------- -- - -
  • Dmitri Pissarenko at May 6, 2007 at 6:12 pm
    Thanks!
  • Kyncho Pehotinec at May 7, 2007 at 3:49 pm
    Hello,

    Definitely! Everything under /root/static is getting served _as static
    content_.
    I don't see a reason to install yet another plugin/module to serve
    static files.

    Greets,
    K.

    Tobias Kremer wrote:
    Hi Dmitri,
    I have
    a) JavaScript files (*.js) and
    b) images,
    which I want to use with catalyst.
    Where should I put them in order to be able to use it?
    Take a look at the Static::Simple plugin which is enabled
    by default:

    http://search.cpan.org/dist/Catalyst-Plugin-Static-Simple/

    By default, files under /root/static are served as static
    content but you may as well define certain file extensions
    (e.g. .js) to be served as static files AFAIK.

    HTH,

    --Tobias

    _______________________________________/\____ _ . .
    + web ::::::: http://www.funkreich.de
    + last.fm ::: http://www.last.fm/user/soulchild77
    ----------------------------------------------- -- - -
  • Len Jaffe at May 8, 2007 at 11:57 am

    On 5/7/07, Kyncho Pehotinec wrote:
    Hello,

    Definitely! Everything under /root/static is getting served _as static
    content_.
    I don't see a reason to install yet another plugin/module to serve
    static files.
    You should see a reason. That reason being that if you want to server your
    static content through your cat app (which is another discussion
    altogether), then the away to do it is Catalyst::Plugin::Static::Simple.

    You need not install it. It is part of the Cat distribution. Just include
    it with the other plug-ins, and lmost everything in /root/static will be
    served as static content. Check the docs for configuration instructions.

    Len.
    --
    lenjaffe@jaffesystems.com
    614-404-4214
    -------------- next part --------------
    An HTML attachment was scrubbed...
    URL: http://lists.scsys.co.uk/pipermail/catalyst/attachments/20070508/c8186fae/attachment.htm

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupcatalyst @
categoriescatalyst, perl
postedMay 6, '07 at 5:11p
activeMay 8, '07 at 11:57a
posts5
users4
websitecatalystframework.org
irc#catalyst

People

Translate

site design / logo © 2022 Grokbase