This week's book giveaway is in the Android forum.
We're giving away four copies of Learning Java by Building Android Games and have Jean-Marcel Belmont on-line!
See this thread for details.
Win a copy of Learning Java by Building Android Games this week in the Android forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Bear Bibeault
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Knute Snortum
  • Junilu Lacar
  • Devaka Cooray
Saloon Keepers:
  • Ganesh Patekar
  • Tim Moores
  • Carey Brown
  • Stephan van Hulst
  • salvin francis
Bartenders:
  • Ron McLeod
  • Frits Walraven
  • Pete Letkeman

Error "404 404" instead of 404 Page not Found  RSS feed

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,


I have apache httpd for statric pages and tomcat for dynamic pages, everything works well but when i go to a non existant page (dymanic) i get an "incompleet" tomcat 404 error. In postman the status is "404 404" (2x 404)  instead of 404 Not Found.
When a static page does not exist i get the correct 404.html page served from httpd.


Help?
 
Bartender
Posts: 19801
93
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to the Ranch, Rduen!

One and only one server can return a 404 page. So it either comes from Tomcat or it comes from Apache HTTPD, and the authors of the two webapp servers took care to make sure that their default "404" pages each had a unique and distinctive look.

But if you're getting "404" twice on a single page, what I suspect is that this is actually a page that has links to other pages for scripts or images and thus it's possible that the main page is actually being returned, but one or more of the linked items cannot be resolved. This is especially common with improper image links.

Your web browser probably has a page inspection function that can be used to find the URLs of the failing links.
 
rduen haften
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Tim,

Thanks for your quick reply.

The odd thing is that the 404 errorpage is the standard tomcat error page with the purple bar but it only display "HTTP Status 404 – Not Found" in the bar with no type, message and description section. The inspection in the web browser only shows the html code with inline css.

In postman the status bar literally show Status: 404 404 on an other webpage postman shows Status 404 Not Found. it's like due to the 404 404 the httpd doesn't see it as a 404 error and server this tomcat error page instead of the vostum httpd error page.

Sorry for my english, i hope you can understand what i ment.

 
Tim Holloway
Bartender
Posts: 19801
93
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You might not see the entire "404 page" if it's linked inside a smaller container, such as a "div" element. If the div is fixed-size and the page is bigger than that, the rest of the page gets chopped off.

Also, Apache doesn't know about Tomcat's "404" pages. Apache will either handle the request entirely by itself or it will simply forward the (proxy) request to Tomcat. It doesn't look at the content or status codes that come back from Tomcat.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!