Commit 9a3f97665e9c7509d6b77395b8af5697e9ed4258
1 parent
3d147b28
对cookie 不第二次添加
Showing
1 changed file
with
2 additions
and
2 deletions
src/com/fh/controller/base/BaseController.java
... | ... | @@ -203,9 +203,9 @@ public class BaseController { |
203 | 203 | String lang = getCookieLanguage(); |
204 | 204 | if (lang == null) { |
205 | 205 | lang = getRequest().getLocale().getLanguage(); |
206 | + Cookie cookies = new Cookie("lang", lang); | |
207 | + getResponse().addCookie(cookies); | |
206 | 208 | } |
207 | - Cookie cookies = new Cookie("lang", lang); | |
208 | - getResponse().addCookie(cookies); | |
209 | 209 | return lang; |
210 | 210 | } |
211 | 211 | ... | ... |