Hi Rick,
Yes, that's the right approach.
Please see for reference :
http://www.web4j.com/UserGuide.jsp#ConfiguringClasses
http://www.web4j.com/UserGuide.jsp#ListingInterfaces
There are 2 different ways of doing this :
1. use your own package tree for your app's main code, PLUS tell web4j
what it needs to know by using the conventional package-and-class-
names under hirondelle.web4j.config - these are found automatically at
startup, without any further config on your part.
This is the style used in the example apps, for example:
hirondelle.electricity... (the main body of the app)
hirondelle.web4j.config (how the app needs to configure web4j; this
uses conventional names)
For your app, this would translate into the structure you described
above:
mycoolapp.foo.bar...
hirondelle.web4j.config
2. use entirely only your own package tree, and tell web4j what it
needs to know by an explicitly mapping (in web.xml) interface names to
the names of concrete classes. (This style doesn't use conventional
names of classes; it uses arbitrary names.)
Personally, I find style 1 more pleasing, since it means you don't
have to do any extra mapping in the web.xml file. But this is really a
matter of taste. Some might find it distasteful to place their code in
"someone else's package", so to speak.
- John