How to emulate nested:root from Struts 1 in Struts 2?

后端 未结 1 1137
借酒劲吻你
借酒劲吻你 2020-12-21 21:33

I am working on converting a Struts1 app to Struts2. I have a jsp that has several JSP included. This included JSPs all have the nested:root tag on it.

相关标签:
1条回答
  • 2020-12-21 22:40

    All nested tags and all Struts1 tags should be removed/replaced with equivalent Struts2 tags.

    Nested tags not needed in Struts2 because it's powered with OGNL. Using OGNL expressions and <s:include> allows to replace nested tags.

    If it's not enough to render content with s:include you can use <s:action> but it's heavy and it recreates a valueStack when this tag executes, so it's rarely used, but custom tags or custom components that include Fremarker or Velocity templates can significantly change the rendering time and allows customization.

    0 讨论(0)
提交回复
热议问题