Yes, you can. Spring understands the importance of creating components as separate module. To do efficient layout Spring has Tiles. You can take a tutorial over here
Spring MVC reusable view components [duplicate]
-
23-06-2022 - |
Question
I want to create an Spring MVC application, but I all tutorials and examples that I saw, there are one view for one controller action. But, can I make something like template.jsp with content and view components, with it's own minilogic and include in view tamplate.
Example template.jsp:
<html>
<head>
......
</head>
<body>
<div id="menu">
#menuComponent
</div>
<content>
#content from action
</content>
</body>
</html>
Solution
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow