1 | |
|
2 | |
|
3 | |
|
4 | |
|
5 | |
|
6 | |
|
7 | |
|
8 | |
|
9 | |
|
10 | |
|
11 | |
|
12 | |
|
13 | |
package org.kuali.rice.kns.web.listener; |
14 | |
|
15 | |
import javax.servlet.ServletContext; |
16 | |
import javax.servlet.ServletContextEvent; |
17 | |
import javax.servlet.ServletContextListener; |
18 | |
|
19 | |
import org.apache.log4j.Logger; |
20 | |
import org.kuali.rice.core.util.RiceConstants; |
21 | |
import org.kuali.rice.kew.util.KEWConstants; |
22 | |
import org.kuali.rice.kns.ConfigProperties; |
23 | |
import org.kuali.rice.kns.authorization.AuthorizationConstants; |
24 | |
import org.kuali.rice.kns.service.KNSServiceLocator; |
25 | |
import org.kuali.rice.kns.util.KNSConstants; |
26 | |
import org.kuali.rice.kns.util.KNSPropertyConstants; |
27 | |
|
28 | |
|
29 | |
|
30 | |
|
31 | 0 | public class JstlConstantsInitListener implements ServletContextListener { |
32 | |
|
33 | 0 | private static final Logger LOG = Logger.getLogger(JstlConstantsInitListener.class); |
34 | |
|
35 | |
public void contextInitialized(ServletContextEvent sce) { |
36 | |
|
37 | 0 | LOG.info("Starting " + JstlConstantsInitListener.class.getName() + "..."); |
38 | 0 | ServletContext context = sce.getServletContext(); |
39 | |
|
40 | |
|
41 | 0 | context.setAttribute("Constants", new KNSConstants()); |
42 | |
|
43 | |
|
44 | 0 | context.setAttribute("RiceConstants", new RiceConstants()); |
45 | |
|
46 | |
|
47 | 0 | context.setAttribute("KEWConstants", new KEWConstants()); |
48 | |
|
49 | |
|
50 | 0 | context.setAttribute("ConfigProperties", new ConfigProperties()); |
51 | |
|
52 | |
|
53 | 0 | context.setAttribute("DataDictionary", KNSServiceLocator.getDataDictionaryService().getDataDictionaryMap()); |
54 | |
|
55 | |
|
56 | 0 | context.setAttribute("AuthorizationConstants", new AuthorizationConstants()); |
57 | |
|
58 | |
|
59 | 0 | context.setAttribute("PropertyConstants", new KNSPropertyConstants()); |
60 | 0 | } |
61 | |
|
62 | 0 | public void contextDestroyed(ServletContextEvent sce) {} |
63 | |
|
64 | |
} |