css - How to display background image when url-pattern is wrong -
this question has answer here:
web.xml mapping is
<servlet-mapping> <servlet-name>faces servlet</servlet-name> <url-pattern>/faces/*</url-pattern> </servlet-mapping>
errorhandler servlet makes request
requestdispatcher view = request.getrequestdispatcher("error.jsp"); view.forward(request, response);
jsp error-page contains style
body { background-image: url(err-images/fon.png); }
how display background image in error-page when url-pattern wrong, example http://localhost:8080/websearchprime_jb/wrong/register.xhtml
well, @ leats 1 solution upload images external hosting , using absolute urls :)
add separate page errors , configure errors status port in web.xml file. this
<error-page> <error-code>400</error-code> <location>/web-inf/jsp/errorpages/errorpage400.jsp</location> </error-page>
like wrong url throws error msg status port 404.
Comments
Post a Comment