当前位置:网站首页>Right click the idea file to create new. There is no solution to create new servlet

Right click the idea file to create new. There is no solution to create new servlet

2022-07-07 23:29:00 codepig16

Author:@codepig16(interesting-wtsb7)

1. Problem description

Created a Javaweb Project but in src Middle right click to create , No, Servlet Options , As shown in the figure below :
 Insert picture description here

2. Solution

The solution is divided into three steps , I have a problem in the third step , It is estimated that most people also have problems in the third step . However, it is suggested to confirm the first two steps .

2.1 determine Servlet Corresponding jar Whether the package was imported successfully

 Insert picture description here

2.2 Confirm to create Servlet Whether the folder of is marked source Folder

File->Project Structure->Mudules-> Right click the code folder
 Insert picture description here

2.3 Set the corresponding SourceRoot

File->Project Structure->Facets
In which directory do you want to create Servlet Just check which directory .
 Insert picture description here

3. Result display

Complete the above steps , Then we can verify , give the result as follows :
 Insert picture description here

原网站

版权声明
本文为[codepig16]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/02/202202130559466031.html