diff --git a/spring-web/src/main/java/org/springframework/web/SpringServletContainerInitializer.java b/spring-web/src/main/java/org/springframework/web/SpringServletContainerInitializer.java index ed68160b2d..2c579172c1 100644 --- a/spring-web/src/main/java/org/springframework/web/SpringServletContainerInitializer.java +++ b/spring-web/src/main/java/org/springframework/web/SpringServletContainerInitializer.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2011 the original author or authors. + * Copyright 2002-2012 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -36,7 +36,7 @@ import org.springframework.core.annotation.AnnotationAwareOrderComparator; * {@code web.xml}-based approach. * *

Mechanism of Operation

- * This class will be loaded and instantiated and have its {@link #onStartup onStartup} + * This class will be loaded and instantiated and have its {@link #onStartup} * method invoked by any Servlet 3.0-compliant container during container startup assuming * that the {@code spring-web} module JAR is present on the classpath. This occurs through * the JAR Services API {@link ServiceLoader#load(Class)} method detecting the @@ -46,18 +46,18 @@ import org.springframework.core.annotation.AnnotationAwareOrderComparator; * JAR Services API documentation as well as section 8.2.4 of the Servlet 3.0 * Final Draft specification for complete details. * - *

when in combination with {@code web.xml}

- *

If a web application does include a {@code WEB-INF/web.xml} file, it is important to + *

In combination with {@code web.xml}

+ *

If a web application includes a {@code WEB-INF/web.xml} file, it is important to * understand that neither this nor any other {@code ServletContextInitializer} will be * processed unless the {@code } element's {@code version} attribute is >= "3.0" * and the {@code xsi:schemaLocation} for "http://java.sun.com/xml/ns/javaee" is set to * "http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd". *

A web application can choose to limit the amount of classpath scanning the Servlet - * container does at startup either through the metadata-complete attribute in + * container does at startup either through the {@code metadata-complete} attribute in * {@code web.xml}, which controls scanning for Servlet annotations or through an * {@code } element also in {@code web.xml}, which controls which * web fragments (i.e. jars) are allowed to perform a {@code ServletContainerInitializer} - * scan. When using this feature, the Spring's {@link SpringServletContainerInitializer} + * scan. When using this feature, the {@link SpringServletContainerInitializer} * can be enabled by adding "spring_web" to the list of named web fragments in * {@code web.xml} as follows: * @@ -94,12 +94,13 @@ import org.springframework.core.annotation.AnnotationAwareOrderComparator; * is not in any way "tied" to Spring MVC other than the fact that the types are shipped * in the {@code spring-web} module JAR. Rather, they can be considered general-purpose * in their ability to facilitate convenient code-based configuration of the - * {@code ServletContext}. Said another way, any servlet, listener, or filter may be + * {@code ServletContext}. In other words, any servlet, listener, or filter may be * registered within a {@code WebApplicationInitializer}, not just Spring MVC-specific * components. * - *

This class is not designed for nor intended to be extended. It should be considered - * an internal type, with {@code WebApplicationInitializer} being the public-facing SPI. + *

This class is neither designed for extension nor intended to be extended. + * It should be considered an internal type, with {@code WebApplicationInitializer} + * being the public-facing SPI. * *

See Also

* See {@link WebApplicationInitializer} Javadoc for examples and detailed usage @@ -127,17 +128,17 @@ public class SpringServletContainerInitializer implements ServletContainerInitia *

If no {@code WebApplicationInitializer} implementations are found on the * classpath, this method is effectively a no-op. An INFO-level log message will be * issued notifying the user that the {@code ServletContainerInitializer} has indeed - * been invoked, but that no {@code WebApplicationInitializer} implementations were + * been invoked but that no {@code WebApplicationInitializer} implementations were * found. * *

Assuming that one or more {@code WebApplicationInitializer} types are detected, * they will be instantiated (and sorted if the @{@link - * org.springframework.core.annotation.Order Order} annotation is present or + * org.springframework.core.annotation.Order @Order} annotation is present or * the {@link org.springframework.core.Ordered Ordered} interface has been * implemented). Then the {@link WebApplicationInitializer#onStartup(ServletContext)} * method will be invoked on each instance, delegating the {@code ServletContext} such * that each instance may register and configure servlets such as Spring's - * {@code DispatcherServlet}, listeners such as Spring's {@code ContextLoaderListener} + * {@code DispatcherServlet}, listeners such as Spring's {@code ContextLoaderListener}, * or any other Servlet API componentry such as filters. * * @param webAppInitializerClasses all implementations of