groovlet

Groovlet + Tomcat: "unable to resolve class" when importing libraries

I'm having some trouble running a groovy servlet (groovlet) in tomcat that imports a library class. When I don't import anything the groovlet works correctly, but if I do import something that I expect to be on the classpath (I can import the same class successfully in a regular servlet), I see the following error: groovy.util.ScriptExc...

JSP PageContext from a Groovlet (Groovy Servlet)

I'm trying to use Groovlets in place of JSPs in an integration framework but one of the vendor's libraries relies on the javax.servlet.jsp.PageContext available in a JSP. I found the GroovyPagesPageContext class that's part of Grails for GSPs. Anyway to use Groovy in this situation and have a handle to the jsp PageContext? I have not...

Does Sitemesh work with Gaelyk ? Does anybody have a working guide?

Has anyone been able to get sitemesh and gaelyk working together? This seems to be possible as mentioned here http://blogs.bytecode.com.au/glen/2009/12/14/getting-sitemesh-running-on-google-app-engine.html. However I unable to get this working with a gaelyk template. I keep getting this error "javax.servlet.ServletException: Creat...

Groovlet not working in GWT project, container : embedded Jetty in google plugin

Hi, I am working on a GWT application which uses GWT-RPC. I just made a test groovlet to see if it worked, but ran into some problems here's my groovlet package groovy.servlet; print "testing the groovlet"; Every tutorial said we don't need to subclass anything, and just a simple script would act as a servlet. my web.xml looks like...

Shorter URL in Groovlet

Consider the following Groovlet: html.html { head { title("Groovy Test") } body { center { img(src:"getPlot.groovy?name=name&value=value") } } } Is there a better way to generate the URL? I'm looking to eliminate the explicit var/vals from the URL. ...

How do I delegate building to a method?

I am writing a Groovlet and would like to delegate part of the HTML builder to a method but am having trouble getting it to work. Below is what I have: def pages = [page1: html.p("page1")] html.html { p("p") pages[page1] } I am expecting the following output: <html> <p>p</p> <p>page1</p> </html> Instead what I get is the fo...

Groovy servlet can't find JAR files in Tomcat

I've created a groovlet that will act as a sort of HTTP proxy. It accepts GET requests and then makes web service calls based on the URL provided in the request. Here's the code I've got so far: @Grab(group='org.codehaus.groovy.modules.http-builder', module='http-builder', version='0.5.0') import groovyx.net.http.* import static groovy...

Opening a local file in Groovy

I want to use a File object to read a local file in the same directory as a groovlet. However, using a relative path to the file (either "example.txt" or "./example.txt") doesn't do the trick. If I give it an absolute path (e.g., "/example.txt"), then it works. Is there any way to get the working directory or context path of the groovle...