dev@javaserverfaces.java.net

Groovy setup issue

From: Jon Baso <jr.baso_at_gmail.com>
Date: Thu, 28 Jul 2011 12:19:53 -0500

Good afternoon!

Is there documentation somewhere as to how to setup Groovy with JSF? I
installed the latest version of the groovy eclipse plugin, enabled the
groovy nature, and started coding.

I added the following to my web.xml

<filter>
<filter-name>GroovyFilter</filter-name>
<filter-class>com.sun.faces.scripting.GroovySupportFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>GroovyFilter</filter-name>
<url-pattern>/\*</url-pattern>
<dispatcher>REQUEST</dispatcher>
<dispatcher>FORWARD</dispatcher>
<dispatcher>INCLUDE</dispatcher>
<dispatcher>ERROR</dispatcher>
</filter-mapping>

then went to create a managed bean:

import javax.faces.bean.ManagedBean
import javax.faces.bean.SessionScoped

  @ManagedBean(name = "detailBean")
  @SessionScoped
public class OfferDetailDelegate {

     String test1 = "hello!";
     String test2 = "there!";

}


When I start up tomcat I get the following error. I see groovy in my
class/build path.
Jul 28, 2011 12:06:38 PM com.sun.faces.config.AnnotationScanner
processClassList
SEVERE: Unable to load annotated class:
com.xyz.offersworkbench.dao.delegate.OfferDetailDelegate, reason:
java.lang.NoClassDefFoundError: groovy/lang/GroovyObject

Any ideas?

Thanks in advance!

Jon