Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unable to add Servlet in eclipse

I am setting up a simple server project in eclipse (using a Glassfish as a server if it's relevant). I cannot seem to add a Servlet though. Unlike another question I've seen where a project cannot be selected I can select the project, but the finish or next buttons remain disabled. I tried manually creating a class that extends HttpServlet ahead of time and selecting but it the finish and next buttons are still disabled:

Custom 'WebService' servlet is selected but finish is disabled

I am running Eclipse 4.3, and I have tried starting it with -clean. Beyond that I'm not sure what to try.

EDIT:

As I said I orginally tried to create a new class using the dialog and only when that did not work did I create my WebService class. Here is what I orignally tried (using NewWebService as the name since WebService now already exists)

I cannot create new new class either

like image 256
Fr33dan Avatar asked Feb 13 '26 05:02

Fr33dan


1 Answers

Although the question is already marked as answered. There could be other reason to have "next" or "finish" buttons grayed out in "Create Servlet" Dialog.

This could happen, if the PROJECTNAME/WebContent/WEB-INF/web.xml file is corrupt by i.e. misspelled tags or attributes.

like image 81
code_angel Avatar answered Feb 15 '26 18:02

code_angel