title: How to get a Servlet Request attribute in Struts 2.2.1?
body: <p>I'm reading some tutorial where before invocating any action there is a filter that sets an attribute in the ServletRequest as Connection.</p>
  
  <pre><code>public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) {
       Connection connection = new ConnectionFactory().getConnection();
       request.setAttribute("connection", connection);
       chain.doFilter(request, response);
       connection.close();
  }
  </code></pre>
  
  <p>However I still didn't find a way to get the attribute in my Action. How can I get it?</p>