I've been playing with ServiceStack lib's for a couple of weeks and seems found an issue.
When I download an example project for Swagger-UI from github everything works just fine until I add RazorFormat feature. Then I get "Handler for Request not found" error when trying to view localhost:50001/swagger-ui/index.html (which was previously working).
So how to use both: swagger and razor?
I tried to rename index.html to index.cshtml to make razor engine deal with this file. The page was working but no JS, and no CSS downloaded, so it wasn't useful much.
Related
My intellij can't recognise path to images and other files but when i use ctlr+left mb it finds file or image without problem. Im working with other ppl and we share it on github and only i have this problem. When i run application web pages are completely fine but when im trying to just view html file it doesnt recognise css and images. I tried creating project again, clearing cache and reinstalling ide. Photo shows files in project
how files are structured
EDIT:
Im trying to view html file clicking this and that is the result. Css and images are missing even though path seems to be correct. Problem occures on my computer. Program works on my teammate pc
I've received an yii2 project zip archive and try to deploy the project on localhost(Windows10/Apache).
I've already install all the dependencies(composer install) and now try to open the site: using "yii serve" in cli and http://localhost:8080/ at my browser.
But something's wrong with it, I can see just html page which isn't working correctly, no js an css are being loaded. If I open the page source(Ctrl+U) I can see that there's no <header></header> tag with js and css at all. See the image attached:
Also, I've created a virtual host for the purpose but the result is the same.
I noticed that if I type http://localhost:8080/login?redirect=%2F it's loading all the js and css but saying: "Page not found".
Also, here is CMD console screenshot:
What can be the issue and how to get it working?
Thanks for advance!
Currently, I am trying to use Codepen Project's environment to build a website and later deploy it. I am using a template that I want to start building from. It has its own HTML pages as well as CSS and JS that is linked. However, when I am working in the project environment I cannot seem to get the CSS to apply to the html code (in other words, the live preview keeps showing naked HTML). I have tried uploading the files into the project's root, tried copying them in newly created css files, and tried using them as external sources (href to an external url in the head tag).
It is really to bad because I feel the Project environment can really offer a lot, though I just can't get it to work.
Thanks in advance, and take care!
LINK TO CODEPEN PROJECT:
https://codepen.io/Thumpertje/project/editor/DxxkqM/
<div class="code">
</div>
I have been searching the forum for answers and similar posts, but none have helped me resolve my issue.
I am working on a standalone project - no server involved. And am trying to load a html file present inside a jar file into a JavaFX Webview using a code similar to the following
webView.getEngine()
.load(this.getClass().getResource("htmlInsideJar.html").toExternalForm());
The page loads into the webView, but the associated JS and CSS files are not loading into the HTML page.
However the HTML page loads just fine with all associated css and js files when loaded directly from disk
webView.getEngine()
.load("htmlFromDiskDirectly.html").toString());
I am using same file-folder structure for files with html, css and js contents.
The java version that I am using is as follows
java version "1.8.0_121"
Java(TM) SE Runtime Environment (build 1.8.0_121-b13)
Java HotSpot(TM) Client VM (build 25.121-b13, mixed mode)
Any help would be deeply appreciated please.
Thanks
I failed to get a solution, so i resorted to having the assets folder outside the jar.
// i set the html base tag with this
String BASE_URL = Paths.get("").toUri().toString();
String pageContent = ReadFileToString.read("page.html").replace("{BASE_URL}", BASE_URL);
in the html file i have something like this
<base href="{BASE_URL}">
<link rel="stylesheet" href="assets/style.css">
NB. the ReadFileToString.read() is just a custom util that reads a html file and returns it in string format.
I have found a fix to this issue. I am using requireJs to load my scripts into the html page. While the page loaded perfectly fine in
IE
firefox
chrome
and even in eclipse's inbuilt web browser
the JavaFX web engine precisely caught few errors where I had mis-spelt a file dependency in a require statement.
I had used some thing like require(['../abcModule/FileDependecy'] .... instead of require(['../abcModule/fileDependecy']. Changing a couple of such stuffs fixed the issue and the page loaded successfully. Had to spend 3 + hours to find a fix for it. grrr –
Thanks to fire-bug lite. Though it does not load neatly inside the JavaFx webview, I was able to mine the error info from the coarse data that appeared to get the issue fixed.
Hope this helps some one
I am trying to validate the home page of my Joomla. The issue is that I have the site on my local host so I can not simply copy the URL into http://validator.w3.org/ to validate.
My next thought was to open the index page in my browser and then run firebug to access the source code, and then copy and paste the code into the validator.
This seemed to work okay however when the code returns errors, I now don't know where to access the html to correct them.
Thoughts?
If you have not much knowledge about the way Joomla works, you will have to learn about the file locations.
Normaly, most changes should be done on the index.php file located in your template folder (root/templates/name_of_your_template/index.php)
If the changes you need to make aren't located in this file, you can have a look at the modules, component or plugin files that output these error and that becomes more serious.
If there is a template override for the module/component/plugin you need to modify, the files should be located in root/templates/name_of_your_template/html/name_of_the_module_component_or_plugin
If there is no template overide for the module/component/plugin that outputs the error, you will have to learn about template overrides.
Depending on your browser, there are many extensions that will validate non-accessible (i.e. localhost) pages
In Google Chrome - https://chrome.google.com/webstore/detail/html-validator/cgndfbhngibokieehnjhbjkkhbfmhojo?hl=en
Once it's installed, click on the icon and validate local page.