What is the default package name for Struts in struts.xml?

前端 未结 3 1221
时光说笑
时光说笑 2020-12-22 02:36

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?

3条回答
  •  时光说笑
    2020-12-22 03:04

    The package name is completely independent of your code artifacts.

    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.

提交回复
热议问题