HttpServletRequest getLocale returns OS locale not browser locale

前端 未结 1 2085
-上瘾入骨i
-上瘾入骨i 2021-01-14 09:03

I am using vaadin framework and in my application I have:

@Override
public void onRequestStart(HttpServletRequest request,
        HttpServletResponse respon         


        
相关标签:
1条回答
  • 2021-01-14 09:05

    Try getting the session locale:

    UI.getCurrent().getSession().getLocale();
    

    That worked for me.

    0 讨论(0)
提交回复
热议问题