Abstract

Java servlets are a central technology of server-side Java development. A servlet is a small pluggable extension to a web server that enhances the server's functionality. A servlet is used to create dynamic content for a webpage, in effect creating a web application. A servlet is a server extension provided by a Java class that can be loaded dynamically by the web server. Today, all major web servers provide support for servlets. As a consequence, servlets are portable across web servers, as well operating environments due to the universal availability of Java on all operating systems. JSP (JavaServer Pages) is closely associated with servlets. A JSP page is a regular web page combining static markup with JSP elements that generate the parts that differ among requests. When a JSP page is requested, the static content is merged with the dynamic content produced from the JSP elements. The result is then returned to the browser. A web server that supports JSP first converts the JSP page into a servlet, in what is known as the translation phase. All static content essentially remains unchanged. All JSP elements are converted to Java code, which provides for the dynamic behavior. This chapter considers Groovlets and GSPs, Groovy's equivalents to Java servlets and JSPs. Once again, it is noted how Groovy simplifies servlets and JSPs.

Talk to us

Join us for a 30 min session where you can share your feedback and ask us any queries you have

Schedule a call

Disclaimer: All third-party content on this website/platform is and will remain the property of their respective owners and is provided on "as is" basis without any warranties, express or implied. Use of third-party content does not indicate any affiliation, sponsorship with or endorsement by them. Any references to third-party content is to identify the corresponding services and shall be considered fair use under The CopyrightLaw.