tapestry-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Howard Lewis Ship" <hls...@gmail.com>
Subject Re: groovy grails and tapestry 5 integration experiments
Date Sun, 04 May 2008 00:02:19 GMT
In case that wasn't coherent; a servlet mapping seems to be easier for
integration but isn't currently supported by T5.  It could be, if it
would make this style of integration easier.

On Sat, May 3, 2008 at 4:54 PM, Howard Lewis Ship <hlship@gmail.com> wrote:
> 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 <ice096@gmail.com> 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: dev-unsubscribe@tapestry.apache.org
>  >  For additional commands, e-mail: dev-help@tapestry.apache.org
>  >
>  >
>
>
>
>  --
>  Howard M. Lewis Ship
>
>  Creator Apache Tapestry and Apache HiveMind
>



-- 
Howard M. Lewis Ship

Creator Apache Tapestry and Apache HiveMind

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org


Mime
View raw message