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?
Related
This is in regards to the sample: msal-web-sample-0.1.0
I am using tomcat 9 and maven to build and run the msal-web-sample code. It is building fine and running, loading spring, etc. I am able to go out and get a username and passowrd login. However, when it tries to return back to my system (https://localhost:8443/msal4jsample/secure/aad) it just has a bit "ERROR PAGE!" heading with Home Page link going back to the main tomcat page.
In the tomcat runtime it has:
2021-06-29 15:28:06.108 ERROR 6360 --- [io-8443-exec-10] o.s.b.w.servlet.support.ErrorPageFilter : Cannot forward to error page for request [/secure/aad] as the response has already been committed. As a result, the response may have the wrong status code. If your application is running on WebSphere Application Server you may be able to resolve this problem by setting com.ibm.ws.webcontainer.invokeFlushAfterService to false
Of course, that doesn't apply to my setup.
I see the get in the logs returning back OK and don't see any errors on startup. I am at a loss as to where to go from here. Any thoughts?
Also, is there a non-spring implementation that can be used with java but still using MSAL?
Thanks
Alan
Please share additional information about the error. Do you have trouble regrading AAD? Check your environmental settings (Tomcat) if this isn't the case.
I'm recording a scenario in JMeter. After adding "CSV data set config" or "Regular Expression Extractor", I get this error in the response: "The origin server did not find a current representation for the target resource or is not willing to disclose that one exists."
so my scenario does not work.
What should i do to fix it?
Looking into the error source - it is normal basic HTTP 404 (Not Found) status.
It means that your request URL is pointing to the content which does not exist.
Inspect failing request details using View Results Tree listener and double check the URLs - most probably there are references to not existing content.
In case if main requests are fine one of embedded resources calls might fail, in order to turn off the checks for embedded resources integrity you can add the next line to user.properties file:
httpsampler.ignore_failed_embedded_resources=true
However assuming everything is fine with your JMeter script HTTP 404 errors indicate a SUT issue which needs to be reported and fixed.
JMeter HTTP Request - 404 ERROR
While I run my jmx file, It throws a 404 error for one of the HTTP Request file. Screen shot is given above.
Can anyone please suggest some solution for this issue.
There is an embedded resource call for the /favicon URL which is not found therefore the request fails.
You should raise an issue as HTTP 404 errors might cause SEO consequences so your site will rank lower
If you don't care about the embedded resources errors you can add the next line to user.properties file:
httpsampler.ignore_failed_embedded_resources=true
JMeter restart will be required to pick the property up.
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.
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