#41 publishing html files that are linked to css, js etc files

v1.0_(example)
open
nobody
None
1
2013-11-30
2013-11-22
void
No

I have problems publish-file ing an index.html file that is linked to some css and javascript files in its <head>,
like;
<link rel="stylesheet" title="emy" type="text/css" href="emy/emy.css">
<link rel="stylesheet" title="emy" type="text/css" href="emy/themes/emy/main.css">
<script src="emy.js"></script>
etc.

and lisp procedure like;
(publish :path "/demos-emy" :file "~/Desktop/projs/proj1/demos/demos-emy/demos/index.html")

but see the result in browser at the address localhost:9090/demos-emy without any style or images or scripts i have once linked to. only markup.
looking by the browser's inspector i see a few messages like:
Failed to load resource: the server responded with a status of 404 (Not Found) http://localhost:9090/emy/emy.css

Is Portable AllegroServe incapable of responding with an html file with its linked files?
Some files should be external to the html file to have a better working environment.
What is the problem here in my case?

Discussion

  • void
    void
    2013-11-22

    I have problems publish-file ing an index.html file that is linked to some css and javascript files in its ,
    like;(i am just omitting <> signs to escape html)

    link rel="stylesheet" title="emy" type="text/css" href="emy/themes/emy/main.css"
    script src="/emy/emy.js" script

    etc.
    and lisp procedure like;

    (publish :path "/demos-emy" :file "~/Desktop/projs/proj1/demos/demos-emy/demos/index.html")

    but see the result in browser at the address localhost:9090/demos-emy without any style or images or scripts i have once linked to. only markup.

    looking by the browser's inspector i see a few messages like:

    Failed to load resource: the server responded with a status of 404 (Not Found) http://localhost:9090/emy/emy.css

    Is Portable AllegroServe incapable of responding with an html file with its linked files?
    Some files should be external to the html file to have a better working environment.
    What is the problem here in my case?

     
  • Rudi Schlatte
    Rudi Schlatte
    2013-11-22

    Did you call publish for emy.css as well, or only for index.html?

     
  • void
    void
    2013-11-22

    i called it only for index.html.
    but now surprisingly i have no problems with emy links but with another index.html files in other file paths with links to some other js and css files in some directories.

    in emy case
    i call publish-file in a dolist traversing a list of lists like (demo1 . "url/of/index.html").
    and also apart from that i have made use of individual publish-file s, and also did not have the above problem this time with emy one.
    in the 5th to 7th indices of the above mentioned list i have the problematic files i mentioned above. i don't understand what happens.

    Can it be problem with browser remembering last load in which no emy.css or emy.js etc was found?

    some times when i tinker with publish-file s and webaction-project maps a bit i go into this problem.

     
  • Rudi Schlatte
    Rudi Schlatte
    2013-11-22

    I think the best way to proceed is to create a proper bug report - something that begins with starting paserve and loading a given file with calls to (publish), then showing a sequence of steps in the browser that reproduce the problem.

     
  • void
    void
    2013-11-22

    thanks i will try it in some time. when i encounter it again i will report its reproduce cycle.

     
  • void
    void
    2013-11-28

    steps to reproduce the above mentioned problem:
    1. quickload aserve.
    2. make a package to non-prefix use of symbols.
    3. start server, on port 9090.
    4. (publish-file :path "/my" :file "~/Desktop/mypage.html")
    5. visit localhost:9090/my
    page loads as if there is no link to an external file, here a css file.
    6. looking at the browser inspector for css file, mystyle.css, it says:
    [Error] Failed to load resource: the server responded with a status of 404 (Not Found) (mystyle.css, line 0)
    7. opening the above served html file without serving but merely double clicking this problem does not occur. browser can link it to the css file.

    this is for publish-file procedure but not for webactions-project mapping, this one works.

    files are in the attachment.

     
    Last edit: void 2013-11-28
  • void
    void
    2013-11-28

    and yet another thing:

    after doing above, without relaunching lisp, doing same things in another package again, say cl-user package, makes request not completed, browser hang and waiting.
    1. quickloading aserve,
    2. not defining a new package but using net.aserve prefixes for them
    3. starting server on the same port 9090, (net.aserve:start :port 9090)
    4. the same procedure call, (net.aserve:publish-file :path "/my" :file "~/Desktop/mypage.html")
    5. visit localhost:9090/my
    browser vaits and hangs

    file for server in the attachment. html css files are same as previous posts attachments.

     
    Last edit: void 2013-11-28
    Attachments
  • void
    void
    2013-11-30

    Is above demand on publish-file procedure beyond the defined capability of publish-file procedure?