Package com.sun.enterprise.deployment.runtime.web

Examples of com.sun.enterprise.deployment.runtime.web.LocaleCharsetInfo


            defaultCharset = (String) iasBean.getAttributeValue(
                                                SunWebApp.PARAMETER_ENCODING,
                                                SunWebApp.DEFAULT_CHARSET);
        }

        LocaleCharsetInfo lcinfo = iasBean.getLocaleCharsetInfo();
        if (lcinfo != null) {
            if (lcinfo.getAttributeValue(
                            LocaleCharsetInfo.DEFAULT_LOCALE) != null) {
               logger.warning("webmodule.default_locale_deprecated");
            }
            /*
             * <parameter-encoding> subelem of <sun-web-app> takes precedence
             * over that of <locale-charset-info>
             */
            if (lcinfo.isParameterEncoding()
                    && !iasBean.isParameterEncoding()) {
                formHintField = (String) lcinfo.getAttributeValue(
                                        LocaleCharsetInfo.PARAMETER_ENCODING,
                                        LocaleCharsetInfo.FORM_HINT_FIELD);
                defaultCharset = (String) lcinfo.getAttributeValue(
                                        LocaleCharsetInfo.PARAMETER_ENCODING,
                                        LocaleCharsetInfo.DEFAULT_CHARSET);
            }
            _lcMap = lcinfo.getLocaleCharsetMap();
        }
    }
View Full Code Here


                               LocaleCharsetMapNode.class, "addLocaleCharsetMap");          
    }
   
    public void startElement(XMLElement element, Attributes attributes) {
  if (element.getQName().equals(RuntimeTagNames.LOCALE_CHARSET_INFO)) {
            LocaleCharsetInfo info = (LocaleCharsetInfo) getDescriptor();
            for (int i=0; i<attributes.getLength();i++) {
                if (RuntimeTagNames.DEFAULT_LOCALE.equals(
                    attributes.getQName(i))) {
                    info.setAttributeValue(LocaleCharsetInfo.DEFAULT_LOCALE,
                        attributes.getValue(i));
                }
            }
        } else if (element.getQName().equals(
            RuntimeTagNames.PARAMETER_ENCODING)) {
      LocaleCharsetInfo info = (LocaleCharsetInfo) getDescriptor();
            info.setParameterEncoding(true);
            for (int i=0; i<attributes.getLength();i++) {
                if (RuntimeTagNames.DEFAULT_CHARSET.equals(
                    attributes.getQName(i))) {
                    info.setAttributeValue(LocaleCharsetInfo.PARAMETER_ENCODING,
                        LocaleCharsetInfo.DEFAULT_CHARSET,
                        attributes.getValue(i));
                }
                if (RuntimeTagNames.FORM_HINT_FIELD.equals(
                    attributes.getQName(i))) {
                    info.setAttributeValue(LocaleCharsetInfo.PARAMETER_ENCODING,
                        LocaleCharsetInfo.FORM_HINT_FIELD,
                        attributes.getValue(i));
                }
            }
  } else super.startElement(element, attributes);
View Full Code Here

                               LocaleCharsetMapNode.class, "addLocaleCharsetMap");          
    }
   
    public void startElement(XMLElement element, Attributes attributes) {
  if (element.getQName().equals(RuntimeTagNames.LOCALE_CHARSET_INFO)) {
            LocaleCharsetInfo info = (LocaleCharsetInfo) getDescriptor();
            for (int i=0; i<attributes.getLength();i++) {
                if (RuntimeTagNames.DEFAULT_LOCALE.equals(
                    attributes.getQName(i))) {
                    info.setAttributeValue(LocaleCharsetInfo.DEFAULT_LOCALE,
                        attributes.getValue(i));
                }
            }
        } else if (element.getQName().equals(
            RuntimeTagNames.PARAMETER_ENCODING)) {
      LocaleCharsetInfo info = (LocaleCharsetInfo) getDescriptor();
            info.setParameterEncoding(true);
            for (int i=0; i<attributes.getLength();i++) {
                if (RuntimeTagNames.DEFAULT_CHARSET.equals(
                    attributes.getQName(i))) {
                    info.setAttributeValue(LocaleCharsetInfo.PARAMETER_ENCODING,
                        LocaleCharsetInfo.DEFAULT_CHARSET,
                        attributes.getValue(i));
                }
                if (RuntimeTagNames.FORM_HINT_FIELD.equals(
                    attributes.getQName(i))) {
                    info.setAttributeValue(LocaleCharsetInfo.PARAMETER_ENCODING,
                        LocaleCharsetInfo.FORM_HINT_FIELD,
                        attributes.getValue(i));
                }
            }
  } else super.startElement(element, attributes);
View Full Code Here

TOP

Related Classes of com.sun.enterprise.deployment.runtime.web.LocaleCharsetInfo

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.