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

    <small id='rJGi7'></small><noframes id='rJGi7'>

    <legend id='rJGi7'><style id='rJGi7'><dir id='rJGi7'><q id='rJGi7'></q></dir></style></legend>
  • <tfoot id='rJGi7'></tfoot>

        struts2 不再接受http map 参数?

        struts2 no longer accepts http map parameters?(struts2 不再接受http map 参数?)

        <small id='xdKLm'></small><noframes id='xdKLm'>

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

            <tfoot id='xdKLm'></tfoot>
              <tbody id='xdKLm'></tbody>
                  本文介绍了struts2 不再接受http map 参数?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  在 struts2 中,我利用了 struts2 中内置的 OGNL,将输入命名为 <input name='bag["item"].property'>哪个去 getters/setters getBag().get("item").setProperty(value)我已经升级到 struts 2.2.1,突然那些不再工作:getter 永远不会被调用.

                  In struts2, I took advantage of built-in OGNL in struts2, naming my inputs like <input name='bag["item"].property'> Which went to getters/setters getBag().get("item").setProperty(value) I've upgraded to struts 2.2.1, and suddently those no longer work: the getter never gets called.

                  互联网对在参数中使用 OGNL 完全保持沉默,好像从来没有人制作过复杂的表格.

                  The internet is utterly silent on using OGNL in parameters, as if nobody ever made complex forms.

                  如何取回我的地图参数?

                  How do I get my map-parameters back?

                  推荐答案

                  事实证明,他们加强了对参数名称的限制以提高安全性.

                  It turns out that they hardened restrictions on parameter names to boost security.

                  所以我不得不添加到我的 struts.xml:

                  So I had to add to my struts.xml:

                         <interceptor-stack name="defaultStack">
                            <interceptor-ref name="params">
                               <!-- For maps to work -->
                               <param name="acceptParamNames">
                                   [a-zA-Z0-9.][()_'s"/]+
                               </param>
                            </interceptor-ref>
                         </interceptor-stack>
                  

                  (我的参数名称中有s 和/s")在那之后文件上传停止工作(拦截器堆栈很疯狂),所以我也必须明确添加它.

                  (I had "s and /s in my parameter names) File upload ceased working after that (interceptor stacks are madness), so I had to add it explicity either.

                  更新:最近我强烈建议使用 JSON 来传递复杂的结构,而不是丰富的 OGNL 形式.当然你需要一些 JS.

                  Update: These days I strongly suggest using JSON to pass complex structures instead of rich OGNL forms. Of course you would need some JS.

                  这篇关于struts2 不再接受http map 参数?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

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

                  相关文档推荐

                  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 的游戏框架.有什么建议吗?)

                  1. <tfoot id='qD32q'></tfoot>
                      <bdo id='qD32q'></bdo><ul id='qD32q'></ul>

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

                      <small id='qD32q'></small><noframes id='qD32q'>

                        <tbody id='qD32q'></tbody>