I have a web app that I have been developing from within Eclipse IDE and have been testing using a Tomcat sever, within Eclipse. Throughout development I've had no issues with CSS files being inaccessible.
Now I'm at a point where I'm using a standalone instance of Apache Tomcat and my CSS files are simply not found? When I try to access them via their URL a 404 error is produced. The location of a CSS file within my project appears to make no difference; I have tried it in a css/ folder and in the root folder of unfiltered pages.
I don't believe this to be an issue with the link I'm referring to the files with.
CSS & Page Location
-- OpportunityTracking (unpacked .war)
-- webapps
-- login.xhtml
-- bootstrap.css
CSS Reference in login.xhtml
<link rel="stylesheet" type="text/css" href="/OpportunityTracking/bootstrap.css" />
web.xml
<display-name>OpportunityTracking</display-name>
...
<mime-mapping>
<extension>css</extension>
<mime-type>text/css</mime-type>
</mime-mapping>
This project was set up as a Maven project however, the javax.faces jar was added as a dependency outside of Maven. Originally, javax.faces-2.1.26.jar was included as a referenced library in the eclipse project.
When faced with an unrelated issue, I removed this reference and included javax.faces-2.2.13.jar as a Maven dependency. In doing this, I appeared to resolve my original issue of CSS and Images not being found.
Update: I suffered this issue again and explored the issue further. By creating a 'Resources' folder in the 'webapps' folder, and referencing the css files from here, I found that all access issues were resolved
Related
I have setup a custom storefront for my hybris project.
I have added a react project(package.json is the custom storefront's folder) within WEB-INF folder.
Using webpack to bundle and code split my js and css.
Is there a way to host the HTML file within Hybris 6.7?
P.S - can't do a separate frontend project, hence this question.
I'm not sure I understand what you are looking for, but you can create a new extension with a web module. This web module can have a page.
See Extension Modules: https://help.sap.com/viewer/b490bb4e85bc42a7aa09d513d0bcb18e/6.7.0.0/en-US/3a3b92d4900b4b3685157b806a73eab2.html
I'm a complete beginner to web development and am trying to deploy my first site via Netlify. Despite my site working fine when being displayed from my local machine, I'm given the following error when navigating to my site's URL:
Page Not FoundLooks like you've followed a broken link or entered a URL that doesn't exist on this site.Back to our site
Since my page is functional on my local machine, I believe the error lies within my Github repo and/or my deploy settings. Here's my repo:
https://github.com/Cotton0419/TestSite
And my deploy settings:
Repository: github.com/Cotton0419/TestSite
Base directory: acme
Build command: Not set
Publish directory: acme/disp
Deploy log visibility: Logs are public
Any help would be greatly appreciated, I can supplement more information if need be.
The Base directory on Netlify is only used by the build environment for a reference to your code base (defaults to root of the repository if not given).
The Publish directory would be relative to the base directory. So in your case disp or acme/disp if using the default.
You are referencing assets in a location that does not exist in your published paths, so they would not exist in your deploy to the CDN.
<link rel="stylesheet" href="../css/style.css">
You should move your assets into your deploy disp folder and edit the correct paths into your code files.
Similar problem I encountered today. I decided to upload an old portfolio I had made a while back. Then for some reason after running the URL on Netlify, nothing happened. The only thing that showed up was a prompt similar to yours -
Page Not Found
Looks like you've followed a broken link or entered a URL that doesn't exist on this site.
Back to our site
After revisiting the HTML and CSS files, I realized that I had set the title for my HTML file to porfolio.html instead of index.html which solved my problem!
For this kind of error please kindly check the HTML filename change it into index.html it worked for me!
For creating my college webpage using polymer, I have downloaded polymer starter kit 1.0.2. I have customized those html files to my desired text and it runs well when I do the below.
gulp serve
opening well is chrome through
http://localhost:3000/
The problem is, it doesn't show up when I drop files into my college server. The reason for creating a website so that it can be viewed under my name like www.college.edu/~rajesh. We have public_html folder wherein if we put html/css/js files and that is it will accessible public from above URL.
when I copied the contents of app folder along with bower_component folder
the site doesn't come up whereas it work fine locally (using localhost). Only the title gets loaded however there is NO html body visible.
I am totally new to polymer. could this be done? if yes am I missing something.
You have to run gulp serve:dist which will build/vulcanize your site. Then you need to copy app/dist folder
Just a further clarification not sure if you ran this command, according to the readme file when you want to deploy your site you need to run
gulp
which will Build and optimize the current project, ready for deployment. This includes linting as well as vulcanization, image, script, stylesheet and HTML optimization and minification.
All the files needed will then be located in the 'dist' folder.
Build and Vulcanize polymer starter kit github README.md
How can I run a .css file using Eclipse?
If I run a .css file using "run on server", the source code is opening in notepad.
You wouldn't usually run a CSS file. You need to attach it to your mark up using the link tag, like this:
<link rel="stylesheet" type="text/css" href="path/path/style.css" />
You can't run a CSS file.
It is a resource a browser can interprete when rending html, which references the css.
What you can do is running a webserver in eclipse and let this provide the css. But this depends on the kind of your project.
For example when it is a Java EE Project and you use the WTP stuff, then you can configure Java EE server runtimes and you can define your project as deployable.
If you are doing php stuff, then normaly you have an external environment like wamp stuff. Where it depends on your configuration how your project resources are placed in the webserver.
So please provide a more specific question, next time.
I am trying to develop an ASP.NET MVC5 solution using IIS Express for local debugging. Frequently, Chrome will report HTTP500 errors trying to load certain JS and CSS files (some using the built in bundling and minification feature of MVC, some on their own).
WTH is going on with this and how do I stop it?
Thanks,
Matthew
Turns out this was related to ninject object lifecycles and my EF db context being open twice at the same time. Totally unrelated to IIS.
What helped worked is as follows. I am using Visual Studio 2015.
Close the visual studio solution. In fact I closed the visual studio itself
In the solution folder(the folder which contains the .sln file along with the project folders), you should find a .vs folder. I had deleted that folder.
Restarted the visual studio and loaded the solution.
Things are working fine now.
The reason I guess is, the config folder inside of .vs folder has the applicationhost.config file. That is having some setting issues.
In my case, I got to remove the attribute of debug="true" in web.config compilation node.
From
<compilation debug="true" targetFramework="4.7.2" />
To
<compilation targetFramework="4.7.2" />
Then it works fine.
Old thread but still relevant in VS 2019 and the top result.
For me, I created a .NET CORE WebApp (an API), then deleted it, deleted the files it left behind and recreated a .NET Framework (API) of the same name.
Started it up and spotted it was still using the same port number
https://localhost:44379
but the basic formatting was gone and 500 errors on all the .css and .js files. After editing the .csproj file and changing
<IISUrl>https://localhost:44379/</IISUrl>
to
<IISUrl>https://localhost:44380/</IISUrl>
Changing this reset something IIS Express and the css and .js files loaded and it looked fine.