web 2.5 project,create servlet,why only create <servlet>,where <servlet-mapping>??
已回答
web 2.5 project,create servlet,why only create <servlet>,where <servlet-mapping>??
idea developer how thnk ?
thank you sumbit!
请先登录再写评论。
You can use Alt+Insert (Generate) | Servlet inside web.xml, it will add both the servlet and servlet-mapping for you.
why idea developer can not auto create <servlet> and <servlet-mapping> both??
new version can add the feature???
We don't plan to add this feature as it's a legacy approach and since Java EE 6 it's recommended to use annotations for servlet mappings instead of the web.xml file.
If you are still working with the old projects, Generate action will solve your problem.
Thank you very much, but also very sorry, I hope everything is perfect!