2 Replies Latest reply on Dec 21, 2011 10:15 PM by kamal_khadka

    How to redirect

    kamal_khadka

      Let's say if the user user types a link in the browser and that page is not in the server then they should be redirected to an error page. How would be able to achieve that.


        • 1. Re: How to redirect
          mikkus70

          Resources not found in the application are actually handled by the container (the JBoss server in this case) not by the application. So, you need to handle it the way the container expects, via a web.xml directive:


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



          You can redirect to a static page or a seam page.

          • 2. Re: How to redirect
            kamal_khadka

            Thank you very much for this idea. I will do this.