can not new a servlet in the web project

Answered

I create a web project by using maven archetype like this 

I also add the javex.servlet dependency in pom.xml

but when I try to new a servlet in web package, I couldn't find the option about servlet. It supposes to have a option like create a servlet or servlet. What should I do?

my idea version is 2023.1.5 Ultimate

I have uploaded my project Upload id: 2024_01_31_FR5CrCeYLQ9UdVexKVSUve (file: login-demo.zip)

Thank you in advanced!

0
2 comments
Hi,
These menus are removed in the IDEA 2023.1: https://youtrack.jetbrains.com/issue/IDEA-309062
You need to manually create these files now.
If you need these menus frequently, you could add some templates for them in `File | Settings | Editor | File and Code Templates`.
please follow this doc on how to do it:

https://www.jetbrains.com/help/idea/2023.1/creating-and-configuring-web-application-elements.html#elements-templates

Or you can use IDEA 2022.5 as a temp workaround, you can download them from https://www.jetbrains.com.cn/idea/download/other.html .
0

got it, thank you so much!

0

Please sign in to leave a comment.