I'm trying to move the following (working) code to an extension:
@WebListener
public class StartupListener implements ServletContextListener {
@ConfigProperty(name = "javax.faces.PROJECT_STAGE")
String projectStage;
@Override
public void contextInitialized(ServletContextEvent sce) {
sce.getServletContext().setInitParameter("javax.faces.PROJECT_STAGE", projectStage);
}
}
When I move this code to an extension runtime
module the property is not resolved (it is null).
The extension source code can be found here.