Summary

In this chapter, we presented an overview of the main technologies used to develop Java web applications. We also highlighted some of the advantages of these technologies. This chapter also introduced an important element for these technologies: the container. In particular, the container used throughout this chapter was Tomcat. You saw how to set up Tomcat, as well as how to perform some basic operations as starting and stopping it; both from the command line and from within Eclipse.

You learned that to get Eclipse to support the development of web applications you need to install a set of plugins collectively named Eclipse WTP. In fact, as you saw, you do not need to install the whole set, this chapter explained what plugins you must install.

After learning about the lifecycle of servlets and the role that the container plays in this context, using the installed set of plugins, we went over the creation of a basic servlet and a more elaborate example. While we were at it, we explained the differences between doGet and doPost. So, now you know when to override each one of them. One of the advantages of using the new servlet API is the use of annotations. Annotating servlets with @WebServlet obviates the need of editing the web.xml file. Further, you learned that servlets can be tested from within Eclipse by using its internal browser: you just need to properly configure a servlet container. You also learned how to create JSPs using Eclipse WTP. Finally, this chapter showed how to create WAR files from Eclipse web projects. From next chapter on, we will delve into more advanced topics. To be more specific, next chapter addresses the development of plugins using Eclipse.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset