Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Different error pages for 404

 
Peter Kovac
Ranch Hand
Posts: 42
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

My question is why there are different error pages for the same 404 status.

E.g:

http://my.server.com -> returns empty page / no content / status=404
http://my.server.com/invalid_app_context -> returns empty page / no content / status=404
http://my.server.com/app_context/INVALID -> returns the usual error report page / status=404


I've an application installed in app_context in the last request but the URL is wrong for it.

Thanks,
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64629
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The first two will be handled by whatever's installed as the ROOT web app. So no surprise that they're different from the last, which is handled by your web app.
 
Peter Kovac
Ranch Hand
Posts: 42
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Bear Bibeault wrote:The first two will be handled by whatever's installed as the ROOT web app. So no surprise that they're different from the last, which is handled by your web app.

Thanks. Do you how can I configure the root web app? Where's it located? My WEB-INF contains only my application.

 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64629
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Create a web app with a context path of ROOT.
 
Peter Kovac
Ranch Hand
Posts: 42
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks I found the DefaultServlet as the root app.
But is there a reason why you have different behavior between deployed applications and root by default? I mean should they just show the same error page if no customization is done?
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64629
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If they do the same thing, things will be the same. But nothing says that they do the same thing.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic