Groovlet classpath

269 Views Asked by At

I'm writing a simple groovlet web application.

I have some groovy libraries (*.groovy), and all groovlets share this libraries.

Where should I put the groovy libraries for using in groovlets?

(I don't want to compile the library *.groovy because it could be changed many times)

1

There are 1 best solutions below

0
Michael Easter On

See "Setting up groovylets [sic]" at this page.

To summarize the idea, assuming your webapp is called Pets:

  • edit ~/webapps/Pets/WEB-INF/web.xml as described
  • Groovy jars reside in ~/webapps/Pets/WEB-INF/lib as described
  • your Groovlets (*.groovy files) reside in ~/webapps/Pets
  • your custom Groovy jars/libraries reside in ~/webapps/Pets/WEB-INF/lib, per standard Servlet spec