My first ever experience in building servlet REST API.

Creating a maven project.

What is Maven? Maven is a build automation tool that is mostly used in Java projects. Using maven as a build tool in my web servlet project was an amazing experience.

Method implementation

A Java servlet does not have a main method. They include methods that you can use to hook into when a specific event occurs (For example - a click on the button, HTTP PUT request on a HttpServlet). During the creation of the servlet, I primarily focused on four methods while implementing. Those are,

  1. doGet (GET)
  2. doDelete (DELETE)
  3. doUpdate (PUT)



Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Pasindu Rupasinghe

Pasindu Rupasinghe

Undergraduate at University of Colombo School of Computing.