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

        <tfoot id='Gqa4a'></tfoot>
        <legend id='Gqa4a'><style id='Gqa4a'><dir id='Gqa4a'><q id='Gqa4a'></q></dir></style></legend>

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

        • <bdo id='Gqa4a'></bdo><ul id='Gqa4a'></ul>

        struts.xml 中 Struts 的默认包名是什么?

        时间:2023-09-27
        <i id='je2Kr'><tr id='je2Kr'><dt id='je2Kr'><q id='je2Kr'><span id='je2Kr'><b id='je2Kr'><form id='je2Kr'><ins id='je2Kr'></ins><ul id='je2Kr'></ul><sub id='je2Kr'></sub></form><legend id='je2Kr'></legend><bdo id='je2Kr'><pre id='je2Kr'><center id='je2Kr'></center></pre></bdo></b><th id='je2Kr'></th></span></q></dt></tr></i><div id='je2Kr'><tfoot id='je2Kr'></tfoot><dl id='je2Kr'><fieldset id='je2Kr'></fieldset></dl></div>

          <bdo id='je2Kr'></bdo><ul id='je2Kr'></ul>
        • <small id='je2Kr'></small><noframes id='je2Kr'>

            <legend id='je2Kr'><style id='je2Kr'><dir id='je2Kr'><q id='je2Kr'></q></dir></style></legend>

                <tbody id='je2Kr'></tbody>
              <tfoot id='je2Kr'></tfoot>
                • 本文介绍了struts.xml 中 Struts 的默认包名是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

                  问题描述

                  我创建了一个名为 RegesterAction 的新类,但我没有将这个类保存在任何包中.如何在 struts.xml 中配置这个类?

                  I created a new class called RegesterAction but I didn't keep this class in any package. How can I configure this class in the struts.xml?

                  下面是 struts.xml 文件,但我无法理解属性值 default"struts-default.

                  Below is the struts.xml file but I'm unable to understand the attribute values "default" and struts-default.

                  <struts>
                      <package name="default" extends="struts-default">
                          <action name="*Register" method="{1}" class="RegisterAction">
                              <result name="populate">/register.jsp</result>
                  </package>
                  </struts>
                  

                  推荐答案

                  包名完全独立于您的代码工件.

                  The package name is completely independent of your code artifacts.

                  struts-default 包是... Struts 2 默认包.它定义了默认结果类型、拦截器、拦截器堆栈和其他一些默认值.您不需要扩展它,但如果你不这样做,你需要做大量的手动工作在你自己的包里.

                  The struts-default package is... the Struts 2 default package. It defines default result types, interceptors, interceptor stacks, and a few other defaults.. You do not need to extend it, but if you don't, you have a fair amount of manual work to do in your own package.

                  我相信你应该将你的动作类放在一个包中,并且想不出任何合理的论据来反对这样做的最佳实践.同样,您的操作类包完全独立于包名称或包扩展的内容(如果有).

                  I believe you should put your action classes in a package, and can think of no reasonable argument against the best practice of doing so. Again, your action class packages are completely independent of package names, or what (if any) the package extends.

                  这篇关于struts.xml 中 Struts 的默认包名是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!

                  上一篇:程序运行时如何播放背景音乐?在java中 下一篇:接口应该放在单独的包中吗?

                  相关文章

                  最新文章

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

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

                  1. <small id='0QyCH'></small><noframes id='0QyCH'>