You will learn about the following in this chapter: Java servlets were a hit from day one. The ability to use Java code on the server released the programmer from having to use three or four different technologies to get a Web application up and running. Not every aspect of the servlet's architecture was well received, however. Programmers had to use the out.println() method on every line of HTML code that was to be output, which proved to be very tedious. True, programmers could write classes that allowed the HTML text to be passed in as a parameter, but this was only slightly better than the println() methods. Another problem with servlets was that they tended to grow to amazing lengths. One servlet would contain code to communicate with the browser, mixed with code to provide presentation logic, which was also mixed with business logic. What was needed was a way to write some sort of scripts inside the HTML statements themselves, in a manner similar to Microsoft's Active Server Pages (ASP), but vendor-neutral and integrated with the servlet and class architecture that was already on the server. The solution that Sun's engineers came up with was called JavaServer Pages (JSP). |