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.HttpServletRequest;
21
22
23 /***
24 * All Actions that want to have access to the servlet request 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 ServletRequestAware {
33
34 /***
35 * Sets the HTTP request object in implementing classes.
36 *
37 * @param request the HTTP request.
38 */
39 public void setServletRequest(HttpServletRequest request);
40 }