1 28 29 package com.caucho.server.webapp; 30 31 import com.caucho.log.Log; 32 import com.caucho.util.L10N; 33 34 import javax.annotation.PostConstruct; 35 import java.util.logging.Logger ; 36 37 40 public class LocaleEncodingMappingList { 41 static final L10N L = new L10N(LocaleEncodingMappingList.class); 42 static final Logger log = Log.open(LocaleEncodingMappingList.class); 43 44 private WebApp _app; 45 46 49 LocaleEncodingMappingList(WebApp app) 50 { 51 _app = app; 52 } 53 54 57 public LocaleEncodingMapping createLocaleEncodingMapping() 58 { 59 return new LocaleEncodingMapping(); 60 } 61 62 public class LocaleEncodingMapping { 63 private String _locale; 64 private String _encoding; 65 66 public void setLocale(String locale) 67 { 68 _locale = locale; 69 } 70 71 public void setEncoding(String encoding) 72 { 73 _encoding = encoding; 74 } 75 76 @PostConstruct 77 public void init() 78 { 79 _app.putLocaleEncoding(_locale, _encoding); 80 } 81 } 82 } 83 | Popular Tags |