java - tomcat 7 conf/web.xml custom error page not picked up by webapps -



java - tomcat 7 conf/web.xml custom error page not picked up by webapps -

i setting custom 404 page in tomcat 7(centos 5).

<error-page> <error-code>404</error-code> <location>/error/404.html</location> </error-page>

the problem is

localhost:8080/badlink displays 404.html

but when using webapps/sample

localhost:8080/sample/badlink displays blank page

the logs /sample/badlink shows

fine: processing errorpage[errorcode=404, location=/error/404.html]

i think tomcat picks custom 404 page doesn't serve browser. because error/404.html placed in webapps/root other webapps dont have access ideas ?

it simple problem, error/404.html should added each webapp installed. redundant copies of files used instead of single global file i.e

/usr/tomcat/webapps/sample/error/404.html /usr/tomcat/webapps/root/error/404.html ..

i couldnt find alternative.

java tomcat centos

Comments

Popular posts from this blog

php - Android app custom user registration and login with cookie using facebook sdk -

django - Access session in user model .save() -

php - .htaccess Multiple Rewrite Rules / Prioritizing -