This article is a mirror article of machine translation, please click here to jump to the original article.

View: 14379|Reply: 0

[Source] IDEA new struts2 project bug resolution

[Copy link]
Posted on 8/7/2018 3:24:47 PM | | | |
org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter
If you are using struts2 version 2.5, you will need to change from org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter to org.apache.struts2.dispatcher.filter.StrutsPrepareAndExecuteFilter

In my struts2-core-2.3.15.3.jar package, I can see that there is org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter

So in the struts2.3 version is no problem at all. There is no such thing as not being found.

But what about version 2.5?

In my struts2-core.jar package (I took a screenshot of struts.xml can already see that it is 2.5).

You can see from struts2-core.jar jar package that there is no ng under org.apache.struts2.dispatcher, that is, org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter does not exist. You can see StrutsPrepareAndExecuteFilter under org.apache.struts2.dispatcher.filter.




Solution:

Modify the value of the Filter-Class in web.xml file to org.apache.struts2.dispatcher.filter.StrutsPrepareAndExecuteFilter (in Struts org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter)


org.apache.catalina.core.StandardContext filterStart
Open the project configuration file file-project Structure
Click on problems in the right sidebar—click fix—-add xxx, as shown below:




Click fix, and IDEA will automatically configure all files for you. There is no need to do a lot of superfluous operations.








Previous:Configuring Tomcat in intelli idea 2018 I couldn't find a workaround
Next:IDEA 2018 Properties Chinese unicode transcoding solution
Disclaimer:
All software, programming materials or articles published by Code Farmer Network are only for learning and research purposes; The above content shall not be used for commercial or illegal purposes, otherwise, users shall bear all consequences. The information on this site comes from the Internet, and copyright disputes have nothing to do with this site. You must completely delete the above content from your computer within 24 hours of downloading. If you like the program, please support genuine software, purchase registration, and get better genuine services. If there is any infringement, please contact us by email.

Mail To:help@itsvse.com