How to specify display name for web application (war) configured programmatically in java with WebApplicationInitializer only. I have something like this
public class WebAppInitializer implements WebApplicationInitializer {
public void onStartup(ServletContext servletContext) throws ServletException {
...
}
}
With web.xml
this look like this:
<web-app xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
version="3.0" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" metadata-complete="false">
<display-name>my app</display-name>
...
</web-app>
Is this possible in Java configuration?