O'Reilly logo

Scripting in Java™: Languages, Frameworks, and Patterns by Dejan Bosanac

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 5. Advanced Groovy Programming

Now that we know how to write and run Groovy scripts, it is time to discuss Groovy extensions and see how we can benefit from them. In Groovy scripts, you can use any Java library and API. However, Groovy offers a few extensions that adapt some of the most popular Java APIs to a scripting programming paradigm. Just as with the classes that handle files and processes, we can find closure support for classes that handle database connections, XML parsing, servlets, and so on.

In this chapter, we cover the following topics:

  • How to work with databases in a “Groovy” way (GroovySQL)
  • How you can use Groovy to write servlets (GroovyServlet)
  • Template processing in Groovy (GroovyTemplate)
  • Groovy’s support for markup ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required