What is error code 504?

In Tomcat 7 in web.xml, how do you set an error-page so that it returns the location but always returns 200, not what the error code would of been (like 404)?

  • I currently have this how do I make it so no matter what page they go to (except a valid one) will given back the index page with a 200 status code <webapp>         <error-page>                 <error-code>404</error-code>                 <location>/index.jsp</location>         </error-page> </webapp>

  • Answer:

    You could set the response status in the error-page (/index.jsp). <â„… response.setStatus(200); %>

Bhuvaneswaran Gopalasamy at Quora Visit the source

Was this solution helpful to you?

Related Q & A:

Just Added Q & A:

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.