I've noticed a few websites deny access from iFrames to their registration and login pages for security reasons. It's a good idea in my opinion.
I'm wondering what settings they need in order to do this as I would like to do the same on my website. The website in question is built in Java and runs on Apache Tomcat.
If anyone knows how this is done it would be great if you could share.
解决方案
well, you should use the x-frame-options.
read this article, hope it helps:
I'm not familiar with jsp and servlets, but i think you could do something like this:
public class NoIFrameAllowedServlet extends HttpServlet {
public void doGet(HttpServletRequest request,
HttpServletResponse response)
throws ServletException, IOException {
response.setHeader("X-Frame-Options", "SAMEORIGIN");
}