web 2.5 project,create servlet,why only create <servlet>,where <servlet-mapping>??

Answered

web 2.5 project,create servlet,why only create <servlet>,where <servlet-mapping>??

idea developer  how thnk ? 

thank you sumbit!

0
4 comments

You can use Alt+Insert (Generate) | Servlet inside web.xml, it will add both the servlet and servlet-mapping for you.

0

why idea developer can not auto create <servlet> and <servlet-mapping> both??

new version can add the feature???

0

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.

0

Thank you very much, but also very sorry, I hope everything is perfect!

0

Please sign in to leave a comment.