How to avoid user access to .xhtml page in JSF?

后端 未结 5 1289
终归单人心
终归单人心 2020-12-06 02:05

I am new to JSF and writing first simply jsf web app.

URL with .jsf are mapping to .xhtml files in WebContent but why I can open .xhtml in web browser with all jsf t

5条回答
  •  日久生厌
    2020-12-06 02:27

    You could add a security constraint to your web.xml blocking all requests to *.xhtml.

    
        Restrict raw XHTML Documents
        
            XHTML
            *.xhtml
        
        
    
    

提交回复
热议问题