Remedy for web.xml not being generated when creating a dynamic web project with eclipse

Permanent update address: https://my.oschina.net/bysu/blog/1679746

Create a dynamic web project (Dynamic web Project), the specific steps are shown in the following picture:

After creation, the entire project directory is as follows:

Due to the subsequent use of the Struts framework, StrutsPrepareAndExecuteFilter needs to be configured. But for this configuration, it needs to be configured in web.xml. You guessed it right, I just found it tragically different from the tutorial - there is no web.xml configuration file.

After searching for a long time, I found a lot of people who are as sad as my brother, and there is a brother who is as persistent as me, and found the following solution . Thank you for this dude. The solution steps are shown in the figure below:

A web.xml file will be generated under the WEB-INF directory.

Reference: https://blog.csdn.net/weiral/article/details/51366485

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324527369&siteId=291194637