Details
-
Type:
Bug
-
Status:
Resolved
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 1.5.7
-
Fix Version/s: 2.0.1Release
-
Component/s: None
-
Labels:None
-
Environment:Eclipse 3.4 SR2
Windows XP
Java 1.5.0_13
-
Number of attachments :
Description
I am trying to implement the TemplateServlet example. The problem is that groovy plugin does not generate the .class, as soon I make a reference to the class TemplateServlet. Even an explicit import "import groovy.servlet.TemplateServlet" is enough to prevent compilation. If I use "import groovy.servlet.*" there is no matter until I do "new TemplateServlet()"
Libraries I use are:
jetty-6.1.15.jar
jetty-util-6.1.15.jar
Tried both servlet-api-2.5-20081211.jar and servlet-api-2.4.jar
Tried both groovy-all-1.5.7.jar (plugin internal) and groovy-all-1.6.0.jar(downloaded)
The script works fine when I execute it in Groovy Console
Code is:
import org.mortbay.jetty.*;
import org.mortbay.jetty.servlet.*;
import groovy.servlet.*;
def server = new Server(1234);
def root = new Context(server,"/",Context.SESSIONS);
def templateServlet = new TemplateServlet();
def holder = new ServletHolder(templateServlet);
root.setResourceBase(".")
root.addServlet(holder, "*.html")
server.start()
Not a problem in V2 of the plugin.