wood burning stoves*
The moose likes Other Application Frameworks and the fly likes How do I make Tapestry notice my module? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Other Application Frameworks
Bookmark "How do I make Tapestry notice my module?" Watch "How do I make Tapestry notice my module?" New topic
Author

How do I make Tapestry notice my module?

Xolani Nkosi
Ranch Hand

Joined: Apr 29, 2009
Posts: 32
I've written a module definition:

When I start my web app up, I get this in the output from tapestry:

- Adding module definition for class org.apache.tapestry5.ioc.services.TapestryIOCModule
- Adding module definition for class org.apache.tapestry5.hibernate.HibernateModule
- Adding module definition for class org.apache.tapestry5.hibernate.HibernateCoreModule
- Adding module definition for class org.apache.tapestry5.upload.services.UploadModule
- Adding module definition for class org.apache.tapestry5.services.TapestryModule
- Adding module definition for class org.apache.tapestry5.internal.services.InternalModule


It hasn't found my ServicesModule - so where do I add this to get Tapestry to pick it up?
Xolani Nkosi
Ranch Hand

Joined: Apr 29, 2009
Posts: 32
I appear to have answered my own question. As a note to framework authors, one problem with using convention over configuration, is if no-one explains the convention in the documentation, it can be hard to work out exactly what you need to do.

Anyway, it appears Tapestry looks for your module using the name you specified in your web.xml for the Tapestry filter. Yeah, wasn't expecting that...

So in my example, if I had:

Then the module appears to be needed to be called:
org.foo.services.TestAppModule

Do that and it'll pick it up and load it
 
Consider Paul's rocket mass heater.
 
subject: How do I make Tapestry notice my module?
 
Similar Threads
How to implement the wall follower algorithm in java?
Wrong coding
More Model-View-Controller advice needed
Sorting by string
Tapestry + REST