Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

JSF/Groovy setup?

878839Jul 28 2011 — edited Aug 1 2011
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

This works if the class is a .java file.

Any ideas?

Thanks in advance!
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 29 2011
Added on Jul 28 2011
1 comment
328 views