Not able to render the components in a Page JSP using view name defined as meta field in CT. I am using the tag in the page JSP but when I hit the page url its looking for component jsp created exactly with CT name instead of view name.
There was a bug in dd4t 2.0.1-beta and 2.0.2, which caused rendering component presentations to by default look at the metadata key viewName instead of view.
This has been fixed in dd4t-java version 2.0.3 and that build is now in Maven Central, so please update the version in your build to make this work properly.
To reconfirm how the JSP view-finding logic works:
DD4T renders views for CPs by first determining the view name from either the Component Template name or by looking at the "view" metadata key if it is set on the Component Template.
If no view metadata key is present in the Component Presentation, DD4T will take the title of the Component Template. In all cases, the following rules apply:
- Both the value of the view metadata field and the title of the component template will be lower cased;
- Spaces in the value will be dashed ('-').
If for example your view name is: 'generic Content', the JSP view name should be: generic-content.jsp. The determined view name should then be present in the web application as a JSP file. If it is, then a sub Servlet request is fired which outputs the rendered JSP into the parent - usually Page - JSP.