A servlet is a Java class that serves up HTML to a browser.

When a user goes to a URL containing the servlet, the doGet method will get the logic …

The request is what the browser sends to the servlet. The response is what the servlet sends back to the browser.

The servlet has a URL that corresponds to it.

You normally don’t write HTML to the servlet. You put your HTML into a java servlet page (jsp).

You put your web content inside the Web Content directory.

The JSP page is actually compiled into a servlet before the server runs it.


Stay current with the latest in tech comm
Keep current with the latest trends in technical communication by subscribing to the I'd Rather Be Writing newsletter. 4,500+ subscribers