css - How to display background image when url-pattern is wrong -


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

Popular posts from this blog

angularjs - ADAL JS Angular- WebAPI add a new role claim to the token -

php - CakePHP HttpSockets send array of paramms -

node.js - Using Node without global install -