title: request.getHeader returning a null value in a jsp page
body: <p>I have written a filter to add some header values to Response object.</p>
  
  <p>The doFilter is setting some header value as shown below</p>
  
  <pre><code>public void doFilter(final ServletRequest req, final ServletResponse res, final FilterChain filterChain)
              throws IOException, ServletException 
              {   
  
          final HttpServletResponse response = (HttpServletResponse) res;
          final HttpServletRequest request = (HttpServletRequest) req;
  
          response.setHeader("X-FRAME-OPTIONS", "SAMEORIGIN");    
  
          filterChain.doFilter(req, res);     
  
      }
  </code></pre>
  
  <p>Filter mapping is <code>"/*"</code>.</p>
  
  <p>I have index.jsp page as welcome page and this is the only page in my application. I am trying to read the header value set in above method.</p>
  
  <p>My index.jsp is </p>
  
  <pre><code>&lt;%@ page language="java" contentType="text/html; charset=ISO-8859-1"
      pageEncoding="ISO-8859-1"%&gt;
  &lt;%@page import="java.util.*" %&gt;
  &lt;!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"&gt;
  &lt;html&gt;
  &lt;head&gt;
  &lt;meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"&gt;
  &lt;title&gt;Hello world&lt;/title&gt;
  &lt;/head&gt;
  &lt;body&gt;
  
  &lt;%
      out.println("&lt;br/&gt;&lt;br/&gt;XFRAME"+request.getHeader("X-FRAME-OPTIONS"));
  %&gt;
  &lt;br/&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>I am getting Null output in the page. I could not get how I got null value if the value is set to "SAMEORIGIN".</p>
  
  <pre><code>XFRAMEnull 
  </code></pre>
  
  <p>can any one help on this.</p>