Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jetty-users] How to set the X-FRAME options in Jetty 9?

@WebFilter(urlPatterns = { "/*"})
public class XFrameOptionsFilter extends BaseFilter {

  public void doFilter(final ServletRequest request, final ServletResponse response, final FilterChain chain) throws IOException,
      ServletException {
    final HttpServletResponse res = (HttpServletResponse) response;
    res.setHeader("X-Frame-Options", "DENY");
    chain.doFilter(request, response);


On Sunday, 27 September 2015, Vamsy Rajuru <v.rajuru@xxxxxxxx> wrote:
Hi Peter,

Thanks for the reply.

I would really appreciate if you could share the source . 


On Sun, Sep 27, 2015 at 11:49 AM, Peter Ondruška <peter.ondruska+jetty@xxxxxxxx> wrote:
This is not Jetty specific if you deploy standard web application. Just add a filter that adds header to response. Let me know if you need source. 

On Sunday, 27 September 2015, Vamsy Rajuru <v.rajuru@xxxxxxxx> wrote:

I am new to Jetty server. 

As part of our web inspect scan i need to set the X-FRAME-OPTIONS to SAMEORIGIN in jetty9 server. Can someone please let me know the configuration file that need to be edited to set this option.


Vamsydhar Rajuru

jetty-users mailing list
To change your delivery options, retrieve your password, or unsubscribe from this list, visit

Vamsydhar Rajuru
Desk: 732-562-6859
Cell: 732-710-7218

Back to the top