13.8. Servlets

Because ColdFusion is tag-based, and JSP is tag-based for the most part, it is most appropriate to cover JSPs. They are easier to write, deploy, and maintain than servlets. They are capable of everything that servlets are, and they are more familiar to ColdFusion developers. So we will work almost exclusively with them.

However, because eventually every JSP becomes a servlet, and because they continue to be a very important force in the world of J2EE, we should at least introduce them. Here we'll look at a basic “Hello, world” servlet that just prints text to the browser. Then we will look at working with servlet mappings. Finally, because it is such a commonly required task, we'll write a complete application that uses a servlet ...

Get Java™ for ColdFusion® Developers 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.