1
2
3
4
5
6
7
8
9
10
11 package psiprobe.controllers.apps;
12
13 import jakarta.servlet.http.HttpServletRequest;
14 import jakarta.servlet.http.HttpServletResponse;
15
16 import org.apache.catalina.Context;
17 import org.springframework.beans.factory.annotation.Value;
18 import org.springframework.stereotype.Controller;
19 import org.springframework.web.bind.annotation.RequestMapping;
20 import org.springframework.web.servlet.ModelAndView;
21
22 import psiprobe.controllers.AbstractContextHandlerController;
23
24
25
26
27 @Controller
28 public class ListApplicationResourcesController extends AbstractContextHandlerController {
29
30 @RequestMapping(path = "/resources.htm")
31 @Override
32 public ModelAndView handleRequest(HttpServletRequest request, HttpServletResponse response)
33 throws Exception {
34 return super.handleRequest(request, response);
35 }
36
37 @Override
38 protected ModelAndView handleContext(String contextName, Context context,
39 HttpServletRequest request, HttpServletResponse response) throws Exception {
40
41 return new ModelAndView(getViewName(), "resources", getContainerWrapper().getResourceResolver()
42 .getApplicationResources(context, getContainerWrapper()));
43 }
44
45 @Value("resources")
46 @Override
47 public void setViewName(String viewName) {
48 super.setViewName(viewName);
49 }
50
51 }