![]() | ![]() | ![]() |
| |||||||
![]() | ||||||||||
![]() | ![]() | |||||||||
Resin 3.1 Documentation Examples Changes Overview Installation Configuration Quercus SOA/IoC JSP Servlets and Filters Admin (JMX) EJB Amber Security Performance Hessian XML and XSLT Third-party Troubleshooting/FAQ IDE's Scottit Groovy SwiftMQ OpenJMS Hibernate Database |
Groovy is an agile, dynamic programming language that compiles source files directly to java bytecode. Groovy has a syntax similar to Java and includes features found in Python, Ruby, and Smalltalk. See also: Installing Groovy
Install the groovy*.jar and asm*.jar files from the Groovy distribution in
the directory $RESIN_HOME/lib/groovy/groovy-1.0-beta-4.jar $RESIN_HOME/lib/groovy/asm-1.4.1.jar $RESIN_HOME/lib/groovy/asm-attrs-1.4.1.jar $RESIN_HOME/lib/groovy/asm-util-1.4.1.jar
The Groovy compiler <web-app-default> <class-loader> <compiling-loader path="WEB-INF/classes" compiler="groovyc" source-extension=".groovy"/> </class-loader> </web-app-default> <web-app> <class-loader> <compiling-loader path="WEB-INF/classes" compiler="groovyc" source-extension=".groovy"/> </class-loader> </web-app> A Groovy ServletSince Groovy compiles to Java .class files, application can write servlets using groovy. package example; import javax.servlet.GenericServlet; import javax.servlet.ServletRequest; import javax.servlet.ServletResponse; public class MyServlet extends GenericServlet { public void service(ServletRequest req, ServletResponse res) { out = res.getWriter(); out.println("Hello, world"); } }
|