<bdo id='58g5h'></bdo><ul id='58g5h'></ul>

    <small id='58g5h'></small><noframes id='58g5h'>

    <legend id='58g5h'><style id='58g5h'><dir id='58g5h'><q id='58g5h'></q></dir></style></legend>
    <tfoot id='58g5h'></tfoot>

  1. <i id='58g5h'><tr id='58g5h'><dt id='58g5h'><q id='58g5h'><span id='58g5h'><b id='58g5h'><form id='58g5h'><ins id='58g5h'></ins><ul id='58g5h'></ul><sub id='58g5h'></sub></form><legend id='58g5h'></legend><bdo id='58g5h'><pre id='58g5h'><center id='58g5h'></center></pre></bdo></b><th id='58g5h'></th></span></q></dt></tr></i><div id='58g5h'><tfoot id='58g5h'></tfoot><dl id='58g5h'><fieldset id='58g5h'></fieldset></dl></div>

      如何模拟 &lt;nested:root&gt;从 Struts 1 到 Struts 2?

      How to emulate lt;nested:rootgt; from Struts 1 in Struts 2?(如何模拟 lt;nested:rootgt;从 Struts 1 到 Struts 2?)

      <small id='0IWYZ'></small><noframes id='0IWYZ'>

      <i id='0IWYZ'><tr id='0IWYZ'><dt id='0IWYZ'><q id='0IWYZ'><span id='0IWYZ'><b id='0IWYZ'><form id='0IWYZ'><ins id='0IWYZ'></ins><ul id='0IWYZ'></ul><sub id='0IWYZ'></sub></form><legend id='0IWYZ'></legend><bdo id='0IWYZ'><pre id='0IWYZ'><center id='0IWYZ'></center></pre></bdo></b><th id='0IWYZ'></th></span></q></dt></tr></i><div id='0IWYZ'><tfoot id='0IWYZ'></tfoot><dl id='0IWYZ'><fieldset id='0IWYZ'></fieldset></dl></div>

      • <bdo id='0IWYZ'></bdo><ul id='0IWYZ'></ul>

          • <tfoot id='0IWYZ'></tfoot>

              • <legend id='0IWYZ'><style id='0IWYZ'><dir id='0IWYZ'><q id='0IWYZ'></q></dir></style></legend>
                  <tbody id='0IWYZ'></tbody>

                本文介绍了如何模拟 &lt;nested:root&gt;从 Struts 1 到 Struts 2?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                问题描述

                我正在将 Struts 1 应用程序转换为 Struts 2.我有一个包含多个 JSP 的 jsp.这包括的 JSP 都有 <nested:root> 标签.

                I am working on converting a Struts 1 app to Struts 2. I have a jsp that has several JSP included. This included JSPs all have the <nested:root> tag on it.

                除了类似于 <html:root> 之外,我在这个特定标签上几乎没有发现任何东西,所以我在我的 main 中添加了 include 语句JSP 和我将 <html:form> 添加到子 JSP 中,但它不起作用.

                I have found little to nothing on this particular tag except that is similar to <html:root>, so I've added the include statement in my main JSP and I added the <html:form> to the sub JSPs but it didn't work.

                我最初只是将 <s:form> 添加到子 JSP 中,并且子 JSP 中的代码被传递,但子 JSP 中存在的任何标记都没有被处理.p>

                I had initially just added <s:form> to the sub JSPs and the code in the sub JSP was passed along but none of the tags existing in the sub JSP were processed.

                推荐答案

                所有 nested 标签和所有 Struts1 标签都应该被删除/替换为等效的 Struts2 标签.

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

                Struts2 中不需要嵌套标签,因为它由 OGNL 提供支持.使用 OGNL 表达式和 <s:include> 允许替换嵌套标签.

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

                如果使用 s:include 渲染内容还不够,您可以使用 <s:action> 但它很重,并且在执行此标记时会重新创建 valueStack,因此很少使用,但自定义包含 Fremarker 或 Velocity 模板的标签或自定义组件可以显着改变渲染时间并允许自定义.

                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.

                这篇关于如何模拟 &lt;nested:root&gt;从 Struts 1 到 Struts 2?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                相关文档推荐

                Java Bytecode Manipulation Library Suggestions(Java 字节码操作库建议)
                Java CLI UI-design: frameworks or libraries?(Java CLI UI 设计:框架还是库?)
                About the use of Beans.xml configuration file in Spring Framework application(关于Spring Framework应用中Beans.xml配置文件的使用)
                What is the difference between Spring, Struts, Hibernate, JavaServer Faces, Tapestry?(Spring、Struts、Hibernate、JavaServer Faces、Tapestry 有什么区别?)
                Are there any android application framework like spring?(有没有像spring这样的android应用程序框架?)
                Java Swing based game framework. Any advice?(基于 Java Swing 的游戏框架.有什么建议吗?)
                <legend id='TYjzU'><style id='TYjzU'><dir id='TYjzU'><q id='TYjzU'></q></dir></style></legend>
                      <bdo id='TYjzU'></bdo><ul id='TYjzU'></ul>

                      1. <small id='TYjzU'></small><noframes id='TYjzU'>

                          <tbody id='TYjzU'></tbody>
                        <i id='TYjzU'><tr id='TYjzU'><dt id='TYjzU'><q id='TYjzU'><span id='TYjzU'><b id='TYjzU'><form id='TYjzU'><ins id='TYjzU'></ins><ul id='TYjzU'></ul><sub id='TYjzU'></sub></form><legend id='TYjzU'></legend><bdo id='TYjzU'><pre id='TYjzU'><center id='TYjzU'></center></pre></bdo></b><th id='TYjzU'></th></span></q></dt></tr></i><div id='TYjzU'><tfoot id='TYjzU'></tfoot><dl id='TYjzU'><fieldset id='TYjzU'></fieldset></dl></div>
                        • <tfoot id='TYjzU'></tfoot>