Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

I have a problem with jellybean. I download it using build.pl. And then I build the server by copying from the readme, I name sss.pl.

I run sss.pl, and open browser at http://hostname:5000 but it said "The page cannot be found" where do I build my index.html?

Thank

Replies are listed 'Best First'.
Re: jellybean problem(simple)
by chromatic (Archbishop) on Jul 14, 2004 at 15:40 UTC

    You need to add a file container. If you use the latest snapshot (from last night), you can use code similar to:

    use Jellybean::App; my $webroot = '/path/to/your/web/files'; my $app = Jellybean::App->new( HTTP => { LocalPort => 5000 }, contains => { default => { type => 'File', basedir => $webroot, }, }, ); $app->loop();

    Be sure you've installed all of the dependencies; run Build.PL to be sure.

Re: jellybean problem(simple)
by delirium (Chaplain) on Jul 14, 2004 at 12:01 UTC
    I'm not familiar with jellybean, but it sounds like you are running a web server on your local machine. If that is the case, you may be able to replace "hostname" with "localhost" or "127.0.0.1".

    Depending on the setup, you may need to explicitly reference the file you are trying to load, which might need to be in a specific subdirectory of the server. e.g.:
    http://localhost:5000/index.html

    As you can see, there are a lot of maybes and mights here, so can you fill us in a little more about your setup and what you are trying to do?

      I don't know where jellbean put that " specific subdirectory of the server. e.g.: http://localhost:5000/index.html "

      I tried put index.html every where but still '..could not be found'

      I think in jellybean the configuration is in the coding. So anyone know?

Re: jellybean problem(simple)
by gellyfish (Monsignor) on Jul 14, 2004 at 12:51 UTC

    It doesn't appear to me that the example given in the README is actually designed to serve static pages at all (this after a few seconds examination). What do you get if you make a request to http://localhost:5000/wiki/ instead? You should read the documentation carefully if you want to use it to serve static pages for you.

    /J\

      tried that and it state "can't call method "uri" on an undefined value at c:/Perl2/site/lib/Jellybean/Sever/HTTP.pm line 43"