1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18 package org.apache.struts2.interceptor;
19
20 import javax.servlet.http.HttpServletResponse;
21
22
23 /***
24 * All Actions that want to have access to the servlet response object must implement this interface.<p>
25 * <p/>
26 * This interface is only relevant if the Action is used in a servlet environment.<p>
27 * <p/>
28 * Note that using this interface makes the Action tied to a servlet environment, so it should be
29 * avoided if possible since things like unit testing will become more difficult.
30 *
31 */
32 public interface ServletResponseAware {
33
34 /***
35 * Sets the HTTP response object in implementing classes.
36 *
37 * @param response the HTTP response.
38 */
39 public void setServletResponse(HttpServletResponse response);
40 }