Hi again,

I'm trying to intercept the pages that are requested in order to add some
security has explained by Howard here:

http://markmail.org/search/?q=tapestry%20authorization#query:tapestry%20authorization+page:1+mid:pyjcj7coe253bkcd+state:results

However I'm getting an IllegalArgumentException Parameter completeId was
null or contained only whitespace. in the following line:

Component page = componentSource.getComponent(pageName);

My code is the following:

public void handlePageRender(PageRenderRequestParameters parameters,
ComponentRequestHandler handler) throws IOException {
 if (dispatchToLoginPage(parameters.getLogicalPageName())) {
return;
}
handler.handlePageRender(parameters);

}

private boolean dispatchToLoginPage(String pageName) {
Component page = componentSource.getComponent(pageName); ---->Exception is
raise here
if (page.getClass().isAnnotationPresent(DontRequireLogin.class)) {
return true;
}
return false;
 }

This only happens when I use the root context of webapp, i.e.
http://localhost:8080/webapp/

If I use http://localhost:8080/webapp/index it does not give the error.

I guess that this is happening because there is no page associated with root
(/)? How can I get the correct page?

Sorry, if this is a silly question, but I'm learning :)

Thank you,


Jp

Reply via email to