blob: b3414bb10b241e78474dbe9291a66f8283a8d912 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
package lq;
import java.io.IOException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.ServletConfig;
import javax.servlet.ServletException;
public class Redirect extends HttpServlet {
private String destination;
@Override
public void init(ServletConfig config) throws ServletException {
destination = config.getInitParameter("destination");
}
@Override
protected void doGet(HttpServletRequest req, HttpServletResponse resp)
throws IOException {
resp.sendRedirect(destination);
}
}
|