How to link Custom interceptor using Annotation

让人想犯罪 __ 提交于 2019-12-03 08:52:27
Umesh Awasthi

I do not have much exp using annotation with or without struts2 but i believe you are using convention-plugin.Here is a quick shot of what they saying about your problem.

If you get errors like "Unable to find interceptor class referenced by ref-name XYZ". This means that the package where Convention is placing your actions, does not extend the package where the interceptor is defined. To fix this problem either

  1. Use @ParentPackage annotation(or struts.convention.default.parent.package) passing the name of the package that defines the interceptor.
  2. Create a package in XML that extends the package that defines the interceptor, and use @ParentPackage(or Struts.convention.default.parent.package) to point to it.

For more details refer there documentation

convention-plugin

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!