Relationship between http 404 error and urls - spring

I'm a bit confused with when http 404 will occurs.
Using Spring petclinic as example.
https://github.com/spring-projects/spring-petclinic/
Test and result
http://localhost:9966/petclinic/ -> load successfully
http://localhost:9966/petclinic/abdfef -> http 404
http://localhost:9966/ -> blank page
I clearly remember application will provide an 404 if I enter xxx://localhost:9966/
May I know what determines the 404 from happening ? and how do I enable it?

I'm going to pretend for this that your document root is /var/www
When you go to http://localhost:9966/petclinic/abdfef, your web server attempts to load /var/www/petclinic/abdfef, which doesn't exist.
When you go to http://localhost:9966/, it looks for /var/www/
It does exist, but it may not have an index or default file. Some web servers will display a 404 error, some will display a 403 error, and some will give you a list of all files in that directory. It depends on the web server as well as how you have the web server configured.
For more information

Related

Problem Pentaho 9.1 when using CDE Dashboard

I have a problem in an installation of Pentaho 9.1 that I have made in our environment, and it is the following.
I have successfully installed Pentaho 9.1 CE in our environment, following the documentation correctly. Since we have an nginx balancer in front of us to redirect the requests that are made depending on which applications, send them to the corresponding web server.
For our Pentaho installation, we have changed the URL path, so that instead of accessing through http://servername/pentaho we access through http://servername/apps/dashboards/pentaho. The only change that has been made in Pentaho, is to change the path within Tomcat so that it takes this URL by renaming the folder where Pentaho is contained to apps#dashboards#pentaho.
In this way we correctly access the changed URL. But we have a problem, and that is that when we go to access the CDE plugin to generate dashboards, we see that it does not load and we cannot do anything. Opening "Developer Tools" of the browser (firefox, chrome...) in Console, I can see the following errors:
XHRPOST http://example.com/apps/plugin/pentaho-cdf-dd/api/syncronizer/syncronizeDashboard
[HTTP/1.1 404 Not Found 47ms]
XHRPOSThttp://example.com/apps/dashboards/pentaho/api/repos/pentaho-cdf-dd/tmp/.cache/lang/messages.properties
[HTTP/1.1 403 Forbidden 53ms]
XHRPOSThttp://example.com/apps/dashboards/pentaho/api/repos/pentaho-cdf-dd/tmp/.cache/lang/messages_en.properties
[HTTP/1.1 403 Forbidden 53ms]
XHRPOSThttp://example.com/apps/dashboards/pentaho/api/repos/pentaho-cdf-dd/tmp/.cache/lang/messages_es-ES.properties
[HTTP/1.1 403 Forbidden 52ms]
XHRGET http://example.com/apps/plugin/pentaho-cdf-dd/api/plugins/get
You can see that when you access File > New > CDE Dashboard it doesn't load because it doesn't build the full URL correctly, and that's why it returns a 404 on some calls.
How can I solve this problem?
Best regards

HTTP STATUS 404 /Spring MVC

I am not able to run a link. After hitting the link, it shows:
"http status 404" - requested resource is not available.
Although, I think from my side, I did my best as its just simple code of one dispatcher servlet and the respective output file - HelloPage.jsp
attaching screen shot of my directory structure and dispatcher-servlet.xml.
What's wrong with my setup?

Service worker Failed to load resource: net::ERR_UNSAFE_REDIRECT

would you please tell me what i did wrong with my service worker installation, i have those errors appear in chrome console (see the image-1).
The script resource is behind a redirect, which is disallowed. service-worker.js:1
Failed to load resource: net::ERR_UNSAFE_REDIRECT https://harampress.com/post/45/service-worker.js
i use Laravel framework in backend if that could help
just to know that my service-worker.js is in the root of the website, works fine on home page no errors on chrome console, but the moment i try to navigate to a post for example, those two errors appears (see image-2).
knowing that i use sw-precache and sw-toolbox, i generate the service worker useing sw-precache with gulp.
image-1
image-2
see the solutions here on github discussion
the message from the discussion in github that actually answered to my problem :
What #wanderview means is that when you do
navigator.serviceWorker.register('/sw.js')
The actual requesting URL is the sw.js located in the root
but when you do
navigator.serviceWorker.register('sw.js')
This is actually a Relative URL so what you actually request might be /post/blah/sw.js and your server might treat it as 404 and do some redirect.

site - is currently unable to handle this request Http error 500

once i clicked on "Proceed to checkout" button, we are getting below error
The sitename.com is't working
www.sitename.co.nz is currently unable to handle this request
Http Error 500
even in backend when we open some orders, than also same error in order-view page.
we have shared hosting.
It was a problem with magento core file cc.php file , one of our devoloper edited it in wrong way, once i replaced the
original file, it worked fine.

How to troubleshoot a 503 error in IIS

I deploy ISS on my location machine. And when I hit my browser with http://localhost/ab, I get a 503 error.
And then I go to iss manager, and i do see a site 'ab' under my machine name. And in 'Directory' under 'Logging', I see directories 'W3SVC1' 'W3SVC2', 'W3SVC3', and i go the most recent log, I don't see any 503 error.
My question is how can I debug my issue?
I read HTTP Error 503, the service is unavailable
And I don't see any error under " Event Viewer, either under the System or the Web Server (IIS)."
Thank you.
503 should be coming from http.sys you need to check in HTTP err logs for the exact reason.
You can find HTTP err log files here - C:\Windows\System32\LogFiles\HTTPERR
Search for the site you are trying to browse in the logs and the last but one field will give you reason.
Based on that you can troubleshoot as explained here
https://support.microsoft.com/en-in/kb/820729

Resources