1
|
|
/* Generated by AspectJ version 1.0.5 */
|
2
|
|
package org.apache.cactus.server;
|
3
|
|
import org.apache.commons.logging.Log;
|
4
|
|
import org.apache.commons.logging.LogFactory;
|
5
|
|
import javax.servlet.ServletException;
|
6
|
|
import javax.servlet.http.HttpServlet;
|
7
|
|
import javax.servlet.http.HttpServletRequest;
|
8
|
|
import javax.servlet.http.HttpServletResponse;
|
9
|
|
|
10
|
|
/**
|
11
|
|
* Generic Servlet redirector that calls a test method on the server side.
|
12
|
|
*
|
13
|
|
* @author <a href="mailto:vmassol@apache.org">Vincent Massol</a>
|
14
|
|
*
|
15
|
|
* @version $Id: ServletTestRedirector.java,v 1.3 2002/07/22 12:26:04 vmassol Exp $
|
16
|
|
* @see ServletTestCaller
|
17
|
|
*/
|
18
|
|
public class ServletTestRedirector extends HttpServlet {
|
19
|
|
/**
|
20
|
|
* The logger
|
21
|
|
*/
|
22
|
|
private static Log LOGGER;
|
23
|
|
/**
|
24
|
|
* Handle GET requests.
|
25
|
|
*
|
26
|
|
* @param theRequest the incoming HTTP client request
|
27
|
|
* @param theResponse the outgoing HTTP client request to send back.
|
28
|
|
*
|
29
|
|
* @exception ServletException if an error occurs when servicing the
|
30
|
|
* request
|
31
|
|
*/
|
32
|
0
|
public void doGet(HttpServletRequest theRequest,
|
33
|
|
HttpServletResponse theResponse) throws ServletException {
|
34
|
0
|
this.doPost(theRequest, theResponse);
|
35
|
|
}
|
36
|
|
|
37
|
|
/**
|
38
|
|
* Handle POST request. Extract from the HTTP request parameter, the
|
39
|
|
* Service to perform : call test method or return tests results.
|
40
|
|
*
|
41
|
|
* @param theRequest the incoming HTTP request.
|
42
|
|
* @param theResponse the outgoing HTTP response.
|
43
|
|
*
|
44
|
|
* @exception ServletException if an error occurs when servicing the
|
45
|
|
* request
|
46
|
|
*/
|
47
|
0
|
public void doPost(HttpServletRequest theRequest,
|
48
|
|
HttpServletResponse theResponse) throws ServletException {
|
49
|
0
|
ServletTestRedirector.LOGGER.debug("------------- Start Servlet service");
|
50
|
0
|
ServletImplicitObjects objects = new ServletImplicitObjects();
|
51
|
0
|
objects.setHttpServletRequest(theRequest);
|
52
|
0
|
objects.setHttpServletResponse(theResponse);
|
53
|
0
|
objects.setServletContext(this.getServletContext());
|
54
|
0
|
objects.setServletConfig(this.getServletConfig());
|
55
|
0
|
ServletTestController controller = new ServletTestController();
|
56
|
0
|
controller.handleRequest(objects);
|
57
|
|
}
|
58
|
|
|
59
|
|
/**
|
60
|
|
* Generic Servlet redirector that calls a test method on the server side.
|
61
|
|
*
|
62
|
|
* @author <a href="mailto:vmassol@apache.org">Vincent Massol</a>
|
63
|
|
*
|
64
|
|
* @version $Id: ServletTestRedirector.java,v 1.3 2002/07/22 12:26:04 vmassol Exp $
|
65
|
|
* @see ServletTestCaller
|
66
|
|
*/
|
67
|
0
|
public ServletTestRedirector() {
|
68
|
0
|
super();
|
69
|
|
}
|
70
|
|
/**
|
71
|
|
* Generic Servlet redirector that calls a test method on the server side.
|
72
|
|
*
|
73
|
|
* @author <a href="mailto:vmassol@apache.org">Vincent Massol</a>
|
74
|
|
*
|
75
|
|
* @version $Id: ServletTestRedirector.java,v 1.3 2002/07/22 12:26:04 vmassol Exp $
|
76
|
|
* @see ServletTestCaller
|
77
|
|
*/
|
78
|
|
static {
|
79
|
|
/**
|
80
|
|
* The logger
|
81
|
|
*/
|
82
|
0
|
ServletTestRedirector.LOGGER = LogFactory.getLog(ServletTestRedirector.class);
|
83
|
|
}
|
84
|
|
|
85
|
|
}
|