servlets

Getting started with servlets

Remarks#

A Servlet is a Java application programming interface (API) running on the server machine which can intercept requests made by the client and can generate/send a response accordingly. A well-known example is the HttpServlet which provides methods to hook on HTTP requests using the popular HTTP methods such as GET and POST. You can configure HttpServlets to listen on a certain HTTP URL pattern, which is configurable in web.xml, or more recently with Java EE 6, with @WebServlet annotation. Many Java EE web frameworks are built on top of servlets, such as JSF, JAX-RS, Spring MVC, Struts, Wicket, etcetera. See also https://stackoverflow.com/questions/2095397/what-is-the-difference-between-jsf-servlet-and-jsp/

Versions#

VersionRelease Date
3.12013-05-21
3.02009-12-01
2.52005-09-01
2.42003-11-01
2.32001-08-01
2.21999-08-01
2.11998-11-01
2.01998-06-01
1.01997-06-01

Installation

Content has been moved back to good ‘ol Servlets wiki page

Hello World with doGet

Content has been moved back to good ‘ol Servlets wiki page

Hello World with doPost

Content has been moved back to good ‘ol Servlets wiki page

Coding style and recommendations

Content has been moved back to good ‘ol Servlets wiki page


This modified text is an extract of the original Stack Overflow Documentation created by the contributors and released under CC BY-SA 3.0 This website is not affiliated with Stack Overflow