When you are not able to add a servlet to the current project in eclipse:
Check that when you want to add the servlet, on the Create Servlet window, you have the folder field populated automatically! If its not then the most possible reason is that somehow your JRE was deleted from your classpath!
Just add it using
1. Right Click Project you are working on from Package Explorer-
2. Go to Properties-
3. Go to Java Build Path from the right tree structure-
4. Go to Libraries Tab-
5. Choose Add Library Button-
6. Select JRE System Library-
7. Hit Next, the Radio button will prompt the Workspace default JRE, and let it be that way-
8. Hit Finish
Done now you can add your servlet!
Check that when you want to add the servlet, on the Create Servlet window, you have the folder field populated automatically! If its not then the most possible reason is that somehow your JRE was deleted from your classpath!
Just add it using
1. Right Click Project you are working on from Package Explorer-
2. Go to Properties-
3. Go to Java Build Path from the right tree structure-
4. Go to Libraries Tab-
5. Choose Add Library Button-
6. Select JRE System Library-
7. Hit Next, the Radio button will prompt the Workspace default JRE, and let it be that way-
8. Hit Finish
Done now you can add your servlet!
Comments