Creating new servlet in eclipse kepler for maven web app project

谁说胖子不能爱 提交于 2021-01-28 13:44:30

问题


I created simple maven web application project. After creation there were no 'src/main/java' and 'src/test/java' folders but only 'src/main/resources'. I added this two folders and updated maven project.

Than I added some package to 'src/main/java' and try to add servlet by right click at package element

enter image description here

At next step I see window with some servlet details

enter image description here

But when I start to add servlet name eclipse shows me message that "Not a java source folder". By the same way I can add simple class to this pachage without any problem but in case of servlet I cannot. Do I miss something during configuration?


回答1:


I could not find the cause of the problem, but I solved it restarting Eclipse (I have Eclipse Neon.2 Release (4.6.2)).



来源:https://stackoverflow.com/questions/25107628/creating-new-servlet-in-eclipse-kepler-for-maven-web-app-project

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!