Last change
on this file since 2569 was
2569,
checked in by keeloo, 11 years ago
|
created branch for parameterized vlo
|
File size:
816 bytes
|
Line | |
---|
1 | |
---|
2 | package eu.clarin.cmdi.vlo.config; |
---|
3 | |
---|
4 | import javax.servlet.ServletContext; |
---|
5 | import org.apache.wicket.protocol.http.WebApplication; |
---|
6 | |
---|
7 | /** |
---|
8 | * |
---|
9 | * @author keeloo |
---|
10 | */ |
---|
11 | public class WebAppParam { |
---|
12 | |
---|
13 | static WebApplication webApp = null; |
---|
14 | |
---|
15 | static ServletContext servletContext = null; |
---|
16 | |
---|
17 | /** |
---|
18 | * |
---|
19 | * @param param |
---|
20 | * @return |
---|
21 | */ |
---|
22 | public static String getContextParam(String param) { |
---|
23 | // throw new UnsupportedOperationException("Not yet implemented"); |
---|
24 | |
---|
25 | if (webApp == null) { |
---|
26 | webApp = WebApplication.get(); |
---|
27 | servletContext = webApp.getServletContext(); |
---|
28 | if (servletContext == null) { |
---|
29 | // handle the error |
---|
30 | } |
---|
31 | } |
---|
32 | |
---|
33 | String value = servletContext.getInitParameter(param); |
---|
34 | |
---|
35 | return value; |
---|
36 | } |
---|
37 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.