Win a copy of Practical SVG this week in the HTML/CSS/JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Redirect Tomcat 404 error

 
don cline
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
All,

I would like to redirect the tomcat 404 error. That is,
if someone enters:
http://mydomain/xyz.jsp

and there is no xyz.jsp page, I would like to redirect them to
http://mydomain/error.jsp

Is there a way I can redirect any possible combination, including
http://mydomain/xyz/xyz.jsp
if there is no xyz directory? (e.g. that path has not been defined)

Thanks in advance
Don
 
Tim Holloway
Bartender
Posts: 18419
60
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hint: look at the options for a J2EE web.xml file
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In your web.xml file, just after the welcome-file-list


 
don cline
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Many Thanks

Don
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!