diff --git a/org.springframework.web.servlet/src/main/java/org/springframework/web/servlet/view/DefaultRequestToViewNameTranslator.java b/org.springframework.web.servlet/src/main/java/org/springframework/web/servlet/view/DefaultRequestToViewNameTranslator.java index 56ea3ba6f2..3fea2b436b 100644 --- a/org.springframework.web.servlet/src/main/java/org/springframework/web/servlet/view/DefaultRequestToViewNameTranslator.java +++ b/org.springframework.web.servlet/src/main/java/org/springframework/web/servlet/view/DefaultRequestToViewNameTranslator.java @@ -31,10 +31,10 @@ import org.springframework.web.util.UrlPathHelper; * {@link org.springframework.web.servlet.DispatcherServlet} context. * Otherwise, a plain default instance will be used. * - *

The default transformation simply strips the leading slash and file - * extension of the URI and returns the result as the view name with the - * configured {@link #setPrefix(String) "prefix"} and a - * {@link #setSuffix(String) "suffix"} added as appropriate. + *

The default transformation simply strips leading and trailing slashes + * as well as the file extension of the URI, and returns the result as the + * view name with the configured {@link #setPrefix "prefix"} and a + * {@link #setSuffix "suffix"} added as appropriate. * *

The stripping of the leading slash and file extension can be disabled * using the {@link #setStripLeadingSlash "stripLeadingSlash"} and