01: package vqwiki.servlets;
02:
03: import java.io.IOException;
04: import java.util.List;
05: import java.util.ResourceBundle;
06:
07: import javax.servlet.ServletException;
08: import javax.servlet.http.HttpServletRequest;
09: import javax.servlet.http.HttpServletResponse;
10:
11: import vqwiki.WikiBase;
12:
13: /**
14: * Give a list of topics, which are logged
15: *
16: * @author garethc
17: * Date: 5/03/2003
18: */
19: public class LockListServlet extends VQWikiServlet {
20:
21: /**
22: * Handle the get request: Give back the list.
23: *
24: * @param request The HttpServletRequest
25: * @param response The HttpServletResponse
26: *
27: * @throws ServletException If something goes wrong
28: * @throws IOException If something goes wrong
29: */
30: protected void doGet(HttpServletRequest request,
31: HttpServletResponse response) throws ServletException,
32: IOException {
33: String virtualWiki = (String) request
34: .getAttribute("virtualWiki");
35: ResourceBundle messages = ResourceBundle.getBundle(
36: "ApplicationResources", request.getLocale());
37: List locks = null;
38: try {
39: locks = WikiBase.getInstance().getHandler().getLockList(
40: virtualWiki);
41: } catch (Exception e) {
42: error(request, response, e);
43: return;
44: }
45: request.setAttribute("locks", locks);
46: request.setAttribute("title", messages
47: .getString("locklist.title"));
48: dispatch("/jsp/locklist.jsp", request, response);
49: }
50: }
|