private static String[] getRuntimes(HttpServletRequest request) { Context context = Context.get(); String environment = "defaultEnvironment"; if (request.getParameter("env") != null) { environment = request.getParameter("env"); } else if (context.getProperty("environment") != null) { environment = context.getProperty("environment"); } Object obj = context.getBean(environment); if (obj != null) { SBTEnvironment bean = (SBTEnvironment) obj; return bean.getRuntimesArray(); } else { return null; } }
public String getParameter(String name) { if (env != null) { String value = env.getPropertyValueByName(name); if (value != null) { return value; } } return null; }