Brook Framework Error lazarus / 38-Networking and Web Programming ---------------------------------------------------------------------- woodengineer · 2017-02-13 19:06 Hello, I am running the unmodified simple static example from the Brook framework and get error for: EBrookHTTP404.create(ARequest.PathInfo); in line 726 of brookrouter.pas I am using "http://localhost:8000/template.html" or "http://localhost:8000" as address. I looked but could not find an answer. I am new to web development. Probably something very simple. Thanks Alex ---------------------------------------------------------------------- Thaddy · 2017-02-13 20:10 the file template.html can not be found in the first case. In the second case the -implicit- file index.html can not be found. Create these files and put them in your server root directory and it should work. Code: HTML5  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i Useless Empty file  Save that as template.html and index.html. It can also be the case that you forgot to set the root path altogether, if these files already exist in the example code. ---------------------------------------------------------------------- woodengineer · 2017-02-13 20:33 Thanks for the reply Thaddy, The file template.html exist. I did also copy template.html to index.html. This example uses the builtin server. I assume that the root directory is the application directory. The full path to the example is: "C:\lazarus\components\brookframework-3.0.0\demos\simple\static\" Not sure how to set the root path? Thanks! Alex ---------------------------------------------------------------------- Leledumbo · 2017-02-14 03:53 Look at unit1.pas and see how TIndex is registered, that's the URI you must use instead of referring to the filename or empty URI, obviously won't work. ---------------------------------------------------------------------- woodengineer · 2017-02-14 13:19 Thanks Leledumbo! It seems that there is something not working correct with the builtin server (probably a setting on my end). I get the default page displayed but the the css and js files are not used and the click event from the js file is not working. When I run the same files in Abyss server, the page displays and works correctly. Thanks ---------------------------------------------------------------------- Leledumbo · 2017-02-15 07:44 Quote from: woodengineer on February 14, 2017, 02:19:05 pmThanks Leledumbo! It seems that there is something not working correct with the builtin server (probably a setting on my end). I get the default page displayed but the the css and js files are not used and the click event from the js file is not working. When I run the same files in Abyss server, the page displays and works correctly. Thanks That's weird, in my case it works as is unmodified. See attached image.