Writing Simple Servlets

At this time, we've learned enough to write a simple servlet. As mentioned earlier, the most popular servlet implementation is based on HTTP protocol, and we'll use this servlet type to write our first servlet. At this point, we won't go into details about the Servlet interface or the different auxiliary objects and interfaces available for the servlet developer to implement a servlet. We'll stick to the methods we've covered so far as part of the servlet life cycle.

Servlets could very well be used for other purposes, such as FTP, SMTP, and so on. These servers could be implemented using the protocol-independent GenericServlet or by directly implementing the Servlet interface. But the most important use of servlets is ...

Get BEA WebLogic Server™ 8.1 Unleashed now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.