2015-01-26 14:27 GMT+03:00 Thomas Strauß <t.stra...@srs-management.de>: > Hi, > > thanks for replying, yes, this question is also posted on SO. > > You did actually help me understand the problem better, yet, I cannot resolve > it for the moment. > > To summarize my findings: I have a principal set in the protected resource. > If a request is triggered from the protected resource, the request is no > longer equipped with the principal in the listener. When arriving on the jsp, > the principal is set again. > > If I set a breakpoint inside the request listener to trigger on a non null > principal, it is never triggered. > > Hmmm, shouldn't tomcat provide the generic principal from the session before > the listener is called, when running form authentication? > > I gave some details to your questions below. > > To (1): is additional source required? > > To (2): Here is the stack when the listener triggers: > > PortalRequestListener.requestInitialized(ServletRequestEvent) line: 79 > StandardContext.fireRequestInitEvent(ServletRequest) line: 6157 > StandardHostValve.__invoke(Request, Response) line: 165 > StandardHostValve.invoke(Request, Response) line: not available > ErrorReportValve.invoke(Request, Response) line: 103 > AccessLogValve.invoke(Request, Response) line: 950 > StandardEngineValve.invoke(Request, Response) line: 116 > CoyoteAdapter.service(Request, Response) line: 421 > Http11Processor(AbstractHttp11Processor).process(SocketWrapper<S>) line: 1070 > Http11Protocol$Http11ConnectionHandler(AbstractProtocol$AbstractConnectionHandler).process(SocketWrapper<S>, > SocketStatus) line: 611 > JIoEndpoint$SocketProcessor.run() line: 314 > > I checked with all requests coming in, but the stack contents is the same for > all breakpoints. >
In this mailing list the convention is to respond below the original question: http://tomcat.apache.org/lists.html#tomcat-users -> 6. The stacktrace above does not have FormAuthenticatorValve, so there is no wonder that request has not been authenticated yet. There is the following change for 7.0.22 in the changelog file: [quote] Correct a regression with the fix for 51653 that broke custom error pages for 4xx responses from the Authenticators. Error handling and request listeners are now handled in the StandardHostValve to ensure they wrap all Context level activity. (markt) [/quote] Best regards, Konstantin Kolinko --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org