Search in sources :

Example 1 with AnnotationConfiguration

use of org.eclipse.jetty.annotations.AnnotationConfiguration in project jetty.project by eclipse.

the class WSServer method createWebAppContext.

public WebAppContext createWebAppContext() throws MalformedURLException, IOException {
    WebAppContext context = new WebAppContext();
    context.setContextPath(this.contextPath);
    context.setBaseResource(Resource.newResource(this.contextDir));
    context.setAttribute("org.eclipse.jetty.websocket.jsr356", Boolean.TRUE);
    // @formatter:off
    context.setConfigurations(new Configuration[] { new AnnotationConfiguration(), new WebXmlConfiguration(), new WebInfConfiguration(), new PlusConfiguration(), new MetaInfConfiguration(), new FragmentConfiguration(), new EnvConfiguration() });
    return context;
}
Also used : WebAppContext(org.eclipse.jetty.webapp.WebAppContext) WebXmlConfiguration(org.eclipse.jetty.webapp.WebXmlConfiguration) WebInfConfiguration(org.eclipse.jetty.webapp.WebInfConfiguration) MetaInfConfiguration(org.eclipse.jetty.webapp.MetaInfConfiguration) PlusConfiguration(org.eclipse.jetty.plus.webapp.PlusConfiguration) FragmentConfiguration(org.eclipse.jetty.webapp.FragmentConfiguration) AnnotationConfiguration(org.eclipse.jetty.annotations.AnnotationConfiguration) EnvConfiguration(org.eclipse.jetty.plus.webapp.EnvConfiguration)

Example 2 with AnnotationConfiguration

use of org.eclipse.jetty.annotations.AnnotationConfiguration in project jetty.project by eclipse.

the class WSServer method createWebAppContext.

public WebAppContext createWebAppContext() throws MalformedURLException, IOException {
    WebAppContext context = new WebAppContext();
    context.setContextPath(this.contextPath);
    context.setBaseResource(Resource.newResource(this.contextDir));
    context.setAttribute("org.eclipse.jetty.websocket.jsr356", Boolean.TRUE);
    // @formatter:off
    context.setConfigurations(new Configuration[] { new AnnotationConfiguration(), new WebXmlConfiguration(), new WebInfConfiguration(), new PlusConfiguration(), new MetaInfConfiguration(), new FragmentConfiguration(), new EnvConfiguration() });
    return context;
}
Also used : WebAppContext(org.eclipse.jetty.webapp.WebAppContext) WebXmlConfiguration(org.eclipse.jetty.webapp.WebXmlConfiguration) WebInfConfiguration(org.eclipse.jetty.webapp.WebInfConfiguration) MetaInfConfiguration(org.eclipse.jetty.webapp.MetaInfConfiguration) PlusConfiguration(org.eclipse.jetty.plus.webapp.PlusConfiguration) FragmentConfiguration(org.eclipse.jetty.webapp.FragmentConfiguration) AnnotationConfiguration(org.eclipse.jetty.annotations.AnnotationConfiguration) EnvConfiguration(org.eclipse.jetty.plus.webapp.EnvConfiguration)

Aggregations

AnnotationConfiguration (org.eclipse.jetty.annotations.AnnotationConfiguration)2 EnvConfiguration (org.eclipse.jetty.plus.webapp.EnvConfiguration)2 PlusConfiguration (org.eclipse.jetty.plus.webapp.PlusConfiguration)2 FragmentConfiguration (org.eclipse.jetty.webapp.FragmentConfiguration)2 MetaInfConfiguration (org.eclipse.jetty.webapp.MetaInfConfiguration)2 WebAppContext (org.eclipse.jetty.webapp.WebAppContext)2 WebInfConfiguration (org.eclipse.jetty.webapp.WebInfConfiguration)2 WebXmlConfiguration (org.eclipse.jetty.webapp.WebXmlConfiguration)2