Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Eclipse doesn't automatically add servlets to web.xml? [duplicate]

I used to use Eclipse Galileo, but now I have Helios. Galileo used to automatically add my servlets to web.xml, but in Helios I have to do this myself.

Is there something I can configure to make this automatic again?

like image 496
Evgeni Dimitrov Avatar asked Mar 21 '11 13:03

Evgeni Dimitrov


People also ask

How do I map a servlet in Web xml?

Configuring and Mapping a Servlet This is done using the <servlet> element. Here you give the servlet a name, and writes the class name of the servlet. Second, you map the servlet to a URL or URL pattern. This is done in the <servlet-mapping> element.

Why is Web xml needed?

web. xml defines mappings between URL paths and the servlets that handle requests with those paths. The web server uses this configuration to identify the servlet to handle a given request and call the class method that corresponds to the request method. For example: the doGet() method for HTTP GET requests.


1 Answers

This hasn't been changed. Most likely you have used New > Class instead of New > Servlet to create the servlet.

like image 62
BalusC Avatar answered Nov 12 '22 07:11

BalusC