I'm new to VRaptor and I encountered a problem.
I'm setting up a project where the second url parameter is the
identifier for the type of style sheet I'll be using. An example would
be /ccp/{
customer.id}/home
I got that working correctly so I then installed a security
interceptor based on the one in the demo application.
public void intercept(InterceptorStack stack, ResourceMethod method,
Object resourceInstance)
throws InterceptionException {
/**
* You can use the result even in interceptors.
*/
if (info.getUser() == null) {
// remember added parameters will survive one more request, when
there is a redirect
result.include("errors", Arrays.asList(new
ValidationMessage("user is not logged in", "user")));
result.forwardTo(AccessController.class).login(null);
}
}
with AccessController.login(null) being:
public void login(Client client) {
result.include("clientId", client.getId());
}
What I was hoping would happen that when I called /ccp/{
customer.id}/
home it would come back with a login page customized with the
customer.id. However, even though I can see the
client.id being
populated in the logs it's not being passed through the Interceptor.
All attempts to call this results in an error as the Client is null.
TIA.
--
Subscription settings:
http://groups.google.com/group/caelum-vraptor-en/subscribe?hl=en