Recompilation problem with groovlets (Groovy)

Posted by BasB on Stack Overflow See other posts from Stack Overflow or by BasB
Published on 2009-03-19T21:16:50Z Indexed on 2010/04/01 20:03 UTC
Read the original article Hit count: 286

Filed under:

I'm new to Groovy, really like it, but found a compilation problem. I'm using Jetty as a webserver, which is serving .groovy files (groovlets)

Consider two files:

Test1.groovy which contains:
   println new Test2().property

Test2.groovy which contains:
  public class Test2 {
   String property = "print this"
 }

When calling /Test1.groovy in a browser it prints "print this". But when I change the property in something else, it still prints "print this", it won't recompile. The only thing I can do is restart jetty. Note that when all the code is in one file, recompilation does work.

Is there a workaround for this..?

Thanks,

Bas.

© Stack Overflow or respective owner

Related posts about groovy