Musachy Barroso wrote:
The scanning doesn't have anything to do with the location of the JSP files.
It is entirely based on the set of package locators and exclude packages. It
uses the classpath scanning mechanism that simply opens all the JAR files
and looks at them. It only loads a class into the JVM if it is in a
correctly named package that is not excluded.

No, what I meant is, if you have your templates under root, like in
rest-showcase and you add:

@ResultPath("/")

then it will scan the whole classpath(unless like you said, the
package locators are modified), which can cause some trouble.
This still shouldn't matter. You shouldn't need to change the package locators to find templates. The ResultPath and all the template configuration is used elsewhere and separate. I keep my templates in WEB-INF/content and my actions are in *actions*, but this is completely arbitrary. Even if you place your templates in /, you can still have a locator like "actions" and exclude packages however you need.

All that is necessary is that the namespace of the action and the result are matched. Therefore you could do this:

action ->    com.example.actions.someNamespace.MyCoolAction
result ->     /some-namespace/my-cool.ftl

This works fine and the locator and exclude packages hasn't been modified. Unless I'm missing something, you case should be easy to fix.

-bp

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to