diff --git a/spring-framework-reference/src/mvc.xml b/spring-framework-reference/src/mvc.xml index 6952dc38d6..ba233d3d7d 100644 --- a/spring-framework-reference/src/mvc.xml +++ b/spring-framework-reference/src/mvc.xml @@ -1891,10 +1891,11 @@ public class TimeBasedAccessInterceptor extends HandlerInterceptorAdapter { The ResourceBundleViewResolver inspects the ResourceBundle identified by the basename, and for each view it is supposed to resolve, it uses the value of the - property [viewname].class as the view class and the - value of the property [viewname].url as the view url. + property [viewname].(class) as the view class and the + value of the property [viewname].url as the view url. + Examples can be found in the next chapter which covers view technologies. As you can see, you can identify a parent view, from which all views in - the properties file sort of extend. This + the properties file extend. This way you can specify a default view class, for example. diff --git a/spring-framework-reference/src/view.xml b/spring-framework-reference/src/view.xml index 1277ce1d1f..0410b7dfa0 100644 --- a/spring-framework-reference/src/view.xml +++ b/spring-framework-reference/src/view.xml @@ -42,10 +42,10 @@ </bean> # And a sample properties file is uses (views.properties in WEB-INF/classes): -welcome.class=org.springframework.web.servlet.view.JstlView +welcome.(class)=org.springframework.web.servlet.view.JstlView welcome.url=/WEB-INF/jsp/welcome.jsp -productList.class=org.springframework.web.servlet.view.JstlView +productList.(class)=org.springframework.web.servlet.view.JstlView productList.url=/WEB-INF/jsp/productlist.jsp As you can see, the @@ -898,13 +898,13 @@ public String deletePet(@PathVariable int ownerId, @PathVariable int petId) { </bean> ... -welcomeView.class=org.springframework.web.servlet.view.tiles2.TilesView +welcomeView.(class)=org.springframework.web.servlet.view.tiles2.TilesView welcomeView.url=welcome (this is the name of a Tiles definition) -vetsView.class=org.springframework.web.servlet.view.tiles2.TilesView +vetsView.(class)=org.springframework.web.servlet.view.tiles2.TilesView vetsView.url=vetsView (again, this is the name of a Tiles definition) -findOwnersForm.class=org.springframework.web.servlet.view.JstlView +findOwnersForm.(class)=org.springframework.web.servlet.view.JstlView findOwnersForm.url=/WEB-INF/jsp/findOwners.jsp ... @@ -1781,13 +1781,13 @@ public class HomePage extends AbstractXsltView { examples above) looks like this for the one-view application that is 'My First Words': - home.class=xslt.HomePage + home.(class)=xslt.HomePage home.stylesheetLocation=/WEB-INF/xsl/home.xslt home.root=words Here, you can see how the view is tied in with the HomePage class just written which handles the - model domification in the first property '.class'. + model domification in the first property '.(class)'. The 'stylesheetLocation' property points to the XSLT file which will handle the XML transformation into HTML for us and the final property '.root' is the name that @@ -1901,13 +1901,13 @@ home.root=words The entire file now looks like this with the XSLT view shown from earlier: - home.class=xslt.HomePage + home.(class)=xslt.HomePage home.stylesheetLocation=/WEB-INF/xsl/home.xslt home.root=words -xl.class=excel.HomePage +xl.(class)=excel.HomePage -pdf.class=pdf.HomePage +pdf.(class)=pdf.HomePage If you want to start with a template spreadsheet or a fillable PDF form to add your model data to, specify the location @@ -2198,7 +2198,7 @@ public class PDFPage extends AbstractPdfView { a matter of adding the appropriate entries in the resource bundle configured in the previous section as shown here: - simpleReport.class=org.springframework.web.servlet.view.jasperreports.JasperReportsPdfView + simpleReport.(class)=org.springframework.web.servlet.view.jasperreports.JasperReportsPdfView simpleReport.url=/WEB-INF/reports/DataSourceReport.jasper Here you can see that the view with name @@ -2368,7 +2368,7 @@ HttpServletResponse response) throws Exception { are being added to the model. To ensure that the correct one is used, we simply modify our view configuration as appropriate: - simpleReport.class=org.springframework.web.servlet.view.jasperreports.JasperReportsPdfView + simpleReport.(class)=org.springframework.web.servlet.view.jasperreports.JasperReportsPdfView simpleReport.url=/WEB-INF/reports/DataSourceReport.jasper simpleReport.reportDataKey=myBeanData