2013-05-13 213 views
0

我在Tomcat的7.0.29部署在Web,生成的HttpServletRequest的對象要求, 當我用像初級講座請求:request.getRemoteUser返回null

String remoteUser=request.getRemoteUser(); 

在remoteuser將是空的。任何方式獲得遠程使用?

我已經refered到鏈接 Accessing username with getRemoteUser() when using custom authentication filter,但解決不了這個錯誤...

+0

'getRemoteUser()''返回時null'用戶不認證。 – NINCOMPOOP 2013-05-13 10:16:34

+0

嗨Noob,你會告訴我如何配置獲得價值...我已經嘗試過,但失敗... – Edward 2013-05-13 10:19:30

+1

@愛德華:如果你想要所有的JEE安全功能,需要一些配置。檢查http://tomcat.apache.org/tomcat-7.0-doc/realm-howto.html – home 2013-05-13 10:21:56

回答