Hello, Scott!

Thank's for response... But I don't understand, why
session at logging moment is null, and nothing user is logged. See my debug log 
(print session and stack is my out)

Access log:
192.168.2.13 - - [12/Sep/2008:11:29:21 +0400] "GET /siteadmin/index.jsp 
HTTP/1.1" 200 330 

Debug log:
2008/09/12 11:29:22.292] Http[11] GET /siteadmin/index.jsp HTTP/1.1
[2008/09/12 11:29:22.292] Http[11] Remote-IP: 192.168.2.13:46388
[2008/09/12 11:29:22.292] Http[11] Accept: ...
[2008/09/12 11:29:22.292] Http[11] Accept-Language: ru
[2008/09/12 11:29:22.292] Http[11] Accept-Encoding: gzip, deflate
[2008/09/12 11:29:22.293] Http[11] User-Agent: ...
[2008/09/12 11:29:22.293] Http[11] Host: localhost:8888
[2008/09/12 11:29:22.293] Http[11] Connection: Keep-Alive
[2008/09/12 11:29:22.293] Http[11] Cookie: JSESSIONID=abcWfv_ltpp58c4xYzvXr
[2008/09/12 11:29:22.294] Dispatch '/siteadmin/index.jsp' to 
WebAppFilterChain[http://localhost:8080, next=SecurityFilterChain[]]
[2008/09/12 11:29:22.294] admin is in role: user
[2008/09/12 11:29:22.294] Get session SessionImpl[abcWfv_ltpp58c4xYzvXr,]
[2008/09/12 11:29:22.294] 
java.lang.Thread:1426com.caucho.server.connection.AbstractHttpRequest:1608_jsp._siteadmin._index__jsp:41com.ca
ucho.jsp.JavaPage:61com.caucho.jsp.Page:578com.caucho.server.dispatch.PageFilterChain:195com.caucho.server.security.SecurityFilterChain:
134com.caucho.server.webapp.WebAppFilterChain:187com.caucho.server.dispatch.ServletInvocation:266com.caucho.server.http.HttpRequest:270c
om.caucho.server.port.TcpConnection:678com.caucho.util.ThreadPool$Item:721com.caucho.util.ThreadPool$Item:643java.lang.Thread:619
[2008/09/12 11:29:22.295] Http[11] HTTP/1.1 200 OK
[2008/09/12 11:29:22.295] Http[11] Cache-Control: private
[2008/09/12 11:29:22.295] Http[11] Content-Type: text/html
[2008/09/12 11:29:22.295] Http[11] Transfer-Encoding: chunked
[2008/09/12 11:29:22.295] Http[11] write-chunk(330)
[2008/09/12 11:29:22.295] Http[11] write-chunk(7)
[2008/09/12 11:29:22.295] Get session null
[2008/09/12 11:29:22.295] 
java.lang.Thread:1426com.caucho.server.connection.AbstractHttpRequest:1608com.caucho.server.log.AccessLog:523c
om.caucho.server.log.AccessLog:348com.caucho.server.webapp.WebAppFilterChain:223com.caucho.server.dispatch.ServletInvocation:266com.cauc
ho.server.http.HttpRequest:270com.caucho.server.port.TcpConnection:678com.caucho.util.ThreadPool$Item:721com.caucho.util.ThreadPool$Item
:643java.lang.Thread:619
[2008/09/12 11:29:22.296] Http[11] keepalive
[2008/09/12 11:29:22.296] Tcp[,11] keepalive (thread)

I would like to log user name :)

12.09.08, 02:24, "Scott Ferguson" <[EMAIL PROTECTED]>:

> On Sep 11, 2008, at 12:48 AM, Jurasic wrote:
> > Hello, All!
> >
> > I have a problem with logging a name of remote user in access log.  
> > I'm using JdbcAuthenticator and form login in OS Resin 3.1.5 (also  
> > tested on 3.1.7a and 3.2.0).
> >
> > At moment when Resin write log records, in AbstractHttpRequest call  
> > getRemoteUser(false), where _session is null, and therefore the  
> > remote user name is empty and we don "-" in access log.
> >
> > Then I change at logging process a call of function to  
> > getRemoteUser(), all done!
> >
> > This is a bug, or I do not understand?
> The logging only uses capabilities your request has use.   
> Specifically, it won't create a session object if your request hasn't  
> already requested a session.  So, an application that doesn't check  
> the user won't automatically run the authentication code just for  
> logging.
> -- Scott
> >
> >
> > Thank's for response!
> >
> >
> > _______________________________________________
> > resin-interest mailing list
> > resin-interest@caucho.com
> > http://maillist.caucho.com/mailman/listinfo/resin-interest
> _______________________________________________
> resin-interest mailing list
> resin-interest@caucho.com
> http://maillist.caucho.com/mailman/listinfo/resin-interest


_______________________________________________
resin-interest mailing list
resin-interest@caucho.com
http://maillist.caucho.com/mailman/listinfo/resin-interest

Reply via email to