The request resource is not available [closed]

When you create servlets you do not directly access the classes.
There are two ways of defining the servlet mappings either through annotations, or through web.xml.

Through Annotation

Servlets using the 3.0 specification have a annotation that specifies the servlet-mapping… you should check this to see which URLs are mapped to your class/servlet.

Have a look at:

You should have a line starting with @WebServlet, for example:

@WebServlet(name="HelloWorldServlet", urlPatterns={"/foo", "/bar"})

In the example above, the servlet doGet and doPost methods are executed when the URLs serverName:Port/foo and serverName:Port/bar are accessed either by PUT or GET.

Through Web.xml

If your using the older specifications, you need to check the web.xml file that has the mapping in XML format.



Leave a Comment