struts-config.xml tiles-def.xml …
Download presentation
Presentation is loading. Please wait.
Published byAshton Bellow Modified over 10 years ago
1
Pure Struts web-application header.jsp footer.jsp menu.jsp body … + mybody.jsp layout.jsp struts-config.xml tiles-def.xml classical include in servlet response classical include in servlet response
2
Pure Struts web-application When an action forwards to a Tiles page The top-level template (layout.jsp) is played and runs the include of the different sections (header, body,..) Consequences There is no jsp that is capable of totally displaying the "final" web page - only the (Tiles)RequestProcessor is able to do it Calling "layout.jsp" will fail Calling "body.jsp" will partially succeed
3
Struts-faces web-application header.jsp footer.jsp menu.jsp body + myJsfPage.jsp layout.jsp <forward name="success" path="/faces/myJsfPage.jsp"/> struts-config.xml tiles-def.xml … <bean:write name="body" filter="false" /> <bean:write name="body" filter="false" />
4
Struts-faces web-application Action-forwards refer to physical jsp page Exactly like a non-Tiles Struts application No more possible to foward to a logical Tiles page Consequences Every jsp should first insert the desired layout (i.e. the Tiles definition) then enclose the variable parts (such as its body) as parameters of the specified layout insertion The jsps are now capable of totally rendering the "final" web page Calling "myJsfPage.jsp" (as JSF is used to do) will succeed
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.