I have written some code to prevent direct access to html files.But, that is not working as expected. I am trying to restrict direct access to any files inside /contextroot/html diretory.
So, i mentioned this in web.xml :
<servlet-mapping>
<servlet-name>HtmlFilter</servlet-name>
<url-pattern>/html/*</url-pattern>
</servlet-mapping>
So, whenever user will try to directly access /html/*.html , HtmlFilter
servlet will be called which will redirect control to html through response.sendRedirect().
So, servlet is getting called whenever /html/* request is there. But,flow is going like this :
servlet-->html-->servlet-->html-->servlet-------..
seems like cyclic behavior.
I am not getting how to prevent /html/* from direct access.
Any help.
