This week's book giveaway is in the Reactive Progamming forum.
We're giving away four copies of Reactive Streams in Java: Concurrency with RxJava, Reactor, and Akka Streams and have Adam Davis on-line!
See this thread for details.
Win a copy of Reactive Streams in Java: Concurrency with RxJava, Reactor, and Akka Streams this week in the Reactive Progamming forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Junilu Lacar
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Knute Snortum
  • Tim Cooke
  • Devaka Cooray
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Ganesh Patekar

How do I make Tapestry notice my module?

 
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 32
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
This. Exactly this. This is what my therapist has been talking about. And now with a tiny ad:
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!