Very hard to follow without some understanding of Grails. The question is: how hard would it be to change Tapestry to work as a filter or as a servlet? I think filter has advantages for many applications (and is maximually concise), but servlet has advantages when integrating Tapestry into other applications.
On Sat, May 3, 2008 at 7:00 AM, ice96 <[EMAIL PROTECTED]> wrote: > > Hello, > I' m traing to integrate tapestry 5 in grails. I read in this > http://www.troymaxventures.com/search/label/grapestry this blog how to > integrate tapestry 4. At the moment my problem that tapestry does not have > org.apache.tapestry.ApplicationServlet and I can't bind .tml files. > > grails plugin looks like this: > > > class Tapestry5GrailsPlugin { > def version = 0.1 > def dependsOn = [:] > // This removes the Grails standard controllers plugin, which means that > standard Grails actions and such would not work anymore. > def evicts=['controllers'] > > def doWithSpring = { > // TODO Implement runtime spring config (optional) > } > def doWithApplicationContext = { applicationContext -> > // TODO Implement post initialization spring config (optional) > } > def doWithWebDescriptor = { xml -> > > > /* > def servlets = xml.servlet[0] > servlets + { > servlet { > 'servlet-name'('tapestryapplication') > 'servlet-class'('org.apache.tapestry.ApplicationServlet') > 'load-on-startup'(1) > } > } > > > > > > > def mappings = xml.'servlet-mapping'[0] > mappings + { > 'servlet-mapping' { > 'servlet-name'('tapestryapplication') > 'url-pattern'('/app') > } > 'servlet-mapping' { > 'servlet-name'('tapestryapplication') > 'url-pattern'('*.html') > } > 'servlet-mapping' { > 'servlet-name'('tapestryapplication') > 'url-pattern'('*.direct') > } > 'servlet-mapping' { > 'servlet-name'('tapestryapplication') > 'url-pattern'('*.sdirect') > } > 'servlet-mapping' { > 'servlet-name'('tapestryapplication') > 'url-pattern'('*.svc') > } > 'servlet-mapping' { > 'servlet-name'('tapestryapplication') > 'url-pattern'('/assets/*') > } > } > > */ > > def contextParam = xml.'context-param'[0] > contextParam + { 'context-param' { > 'param-name'('tapestry.app-package') > 'param-value'('org.tapestry.myapp') > }} > > > def filter = xml.filter[0] > filter + { > 'filter-name'('app') > 'filter-class'('org.apache.tapestry.TapestryFilter') > } > > def filterMapping = xml.'filter-mapping'[0] > filterMapping + { > 'filter-name'('app') > 'url-pattern'('/*') > } > > > > } > > > > > > > > > > > def doWithDynamicMethods = { ctx -> > // TODO Implement additions to web.xml (optional) > } > def onChange = { event -> > // TODO Implement code that is executed when this class plugin class is > changed > // the event contains: event.application and event.applicationContext > objects > } > def onApplicationChange = { event -> > // TODO Implement code that is executed when any class in a > GrailsApplication changes > // the event contain: event.source, event.application and > event.applicationContext objects > } > } > > > > Has anyone ideas? > > -- > View this message in context: > http://www.nabble.com/groovy-grails-and-tapestry-5-integration-experiments-tp17035475p17035475.html > Sent from the Tapestry - Dev mailing list archive at Nabble.com. > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- Howard M. Lewis Ship Creator Apache Tapestry and Apache HiveMind --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
