質問

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>
役に立ちましたか?

解決

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

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top