Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 8 Next »

beta - used in production

Icon

org.tynamo:tapestry-resteasy:0.0.1

Works with RestEASY 1.1.GA but not with newer versions
Works ONLY with singleton resources
Requires Tapestry 5.1.x

To use tapestry-resteasy (an independent module of Tynamo), you need to add the following dependency to your pom.xml:

Modify your web.xml to include the following:

Create a package named "rest" for your rest services.
Code your singleton resource.
Good practices:

  • To name the class use the entity name followed by the word "Resource".
  • The @Path should be the entity name in lowercase.

ej:

Don't forget to annotate your entities with JAXB annotations. You need at least @XmlRootElement. http://www.caucho.com/resin/doc/jaxb-annotations.xtp
ej:

Finally contribute yout singleton resource to your AppModule:

And enjoy.

Note:

If you get this exception:

Add this to your system properties:

eg:

mvn jetty:run

Check google for more information: http://www.google.com/search?hl=en&q=com.sun.xml.stream.ZephyrParserFactory+cannot+be+cast+to+org.codehaus.stax2.XMLInputFactory2&aq=f&oq=&aqi=

  • No labels