6 Replies Latest reply on May 28, 2009 12:48 AM by Denis Forveille

    How to forbid any user to directly ping xhtml file?

    Denis Forveille Novice

      If a user enters an adress like http://<serveur>/App/any-valid-page-name.xhtml in  its browser, by default the xhtml source file will be displayed which is obvisouly not what we want.


      I'm thinking of three ways to solve this and to send back a nice 404-page not found to the user



      • write a filter mapped to *.xhtml before the seam filter and redirect to the page not found page if called

      • declare a seam  filter thanks to the @Filter annotation (But will this interfere with seam?)

      • use some kind of declaration in page.xml?



      How are you guys dealing with this problem?


      Thx