LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   Replacing Tomcat Error page 404 , 504 (https://www.linuxquestions.org/questions/linux-server-73/replacing-tomcat-error-page-404-504-a-718966/)

simon.unix 04-14-2009 04:27 AM

Replacing Tomcat Error page 404 , 504
 
Hi ,
I have problem with Tomcat 6.0.18
- I do not want to show my Server information like tomcat version
- During typing URL , use get 404 not found page , can i configure to get more friendly error page for all of errors and my web application
THanks
Simon

colucix 04-14-2009 04:38 AM

Take a look here. You have to write your own 404 html page and put the correct path as explained in the FAQ.

simon.unix 04-15-2009 04:28 AM

Quote:

Originally Posted by colucix (Post 3508188)
Take a look here. You have to write your own 404 html page and put the correct path as explained in the FAQ.

Ok , thanks , it had been done :
What i did :
- Create a 404.html file in ./webapps/myporject/404.html
- Vi /usr/loca/tomcat/conf/server.xml
Put this content :
<error-page>
<error-code>404</error-code>
<location>404.html</location>
</error-page>

- Restart tomcat

Thanks Colucix !

colucix 04-15-2009 04:34 AM

You're welcome! :)


All times are GMT -5. The time now is 04:42 PM.