Using conditional plugin with struts.xml

I am using a conditional plugin in my project and everything was fine until I needed to add a custom Interceptor. To add a custom interceptor I need to have struts.xml in my project. But when I add struts.xml it gives me 404 errors per page. I tried this solution but it doesn't seem to work. Thank.

0


source to share


1 answer


The config file struts.xml

must be in the source folder, for example src

or resources

. When you build your application, the compiled output is referenced WEB-INF/classes

. You can check this file before deploying or starting the server with the web application already deployed.



FYI, the convention plugin does not replace the XWork configuration, but extends it with the ability to override. struts.xml

used for the same purpose, but using a different configuration provider. Thus, when configuring interceptors using a conditional plugin, make sure you are using the correct parent package that contains your custom interceptor.

+1


source







All Articles