org.apache.coyote.Request.getCharacterEncoding()方法的使用及代码示例

x33g5p2x  于2022-01-29 转载在 其他  
字(6.4k)|赞(0)|评价(0)|浏览(275)

本文整理了Java中org.apache.coyote.Request.getCharacterEncoding方法的一些代码示例,展示了Request.getCharacterEncoding的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Request.getCharacterEncoding方法的具体详情如下:
包路径:org.apache.coyote.Request
类名称:Request
方法名:getCharacterEncoding

Request.getCharacterEncoding介绍

[英]Get the character encoding used for this request.
[中]获取用于此请求的字符编码。

代码示例

代码示例来源:origin: org.jboss.web/jbossweb

  1. /**
  2. * Return the character encoding for this Request.
  3. */
  4. public String getCharacterEncoding() {
  5. return (coyoteRequest.getCharacterEncoding());
  6. }

代码示例来源:origin: org.apache.geronimo.ext.tomcat/catalina

  1. /**
  2. * Return the character encoding for this Request.
  3. */
  4. @Override
  5. public String getCharacterEncoding() {
  6. return coyoteRequest.getCharacterEncoding();
  7. }

代码示例来源:origin: org.apache.catalina/com.springsource.org.apache.catalina

  1. /**
  2. * Return the character encoding for this Request.
  3. */
  4. @Override
  5. public String getCharacterEncoding() {
  6. return coyoteRequest.getCharacterEncoding();
  7. }

代码示例来源:origin: jboss.web/jbossweb

  1. /**
  2. * Return the character encoding for this Request.
  3. */
  4. public String getCharacterEncoding() {
  5. return (coyoteRequest.getCharacterEncoding());
  6. }

代码示例来源:origin: com.ovea.tajin.server/tajin-server-jetty9

  1. /**
  2. * Return the character encoding for this Request.
  3. */
  4. @Override
  5. public String getCharacterEncoding() {
  6. return coyoteRequest.getCharacterEncoding();
  7. }

代码示例来源:origin: codefollower/Tomcat-Research

  1. /**
  2. * Return the character encoding for this Request.
  3. */
  4. @Override
  5. public String getCharacterEncoding() {
  6. return coyoteRequest.getCharacterEncoding();
  7. }

代码示例来源:origin: tomcat/catalina

  1. /**
  2. * Return the character encoding for this Request.
  3. */
  4. public String getCharacterEncoding() {
  5. return (coyoteRequest.getCharacterEncoding());
  6. }

代码示例来源:origin: com.ovea.tajin.servers/tajin-server-jetty9

  1. /**
  2. * Return the character encoding for this Request.
  3. */
  4. @Override
  5. public String getCharacterEncoding() {
  6. return coyoteRequest.getCharacterEncoding();
  7. }

代码示例来源:origin: com.ovea.tajin.server/tajin-server-tomcat7

  1. /**
  2. * Return the character encoding for this Request.
  3. */
  4. @Override
  5. public String getCharacterEncoding() {
  6. return coyoteRequest.getCharacterEncoding();
  7. }

代码示例来源:origin: org.osivia.portal.core/osivia-portal-jbossas-jbossweb-lib

  1. /* */ public String getCharacterEncoding()
  2. /* */ {
  3. /* 946 */ return this.coyoteRequest.getCharacterEncoding();
  4. /* */ }
  5. /* */

代码示例来源:origin: jboss.remoting/jboss-remoting

  1. protected void setConverter()
  2. throws IOException
  3. {
  4. if(coyoteRequest != null)
  5. {
  6. enc = coyoteRequest.getCharacterEncoding();
  7. }
  8. gotEnc = true;
  9. if(enc == null)
  10. {
  11. enc = DEFAULT_ENCODING;
  12. }
  13. conv = (B2CConverter) encoders.get(enc);
  14. if(conv == null)
  15. {
  16. conv = new B2CConverter(enc);
  17. encoders.put(enc, conv);
  18. }
  19. }

代码示例来源:origin: org.ops4j.pax.tipi/org.ops4j.pax.tipi.tomcat-embed-core

  1. /**
  2. * Get the character encoding used for this request.
  3. *
  4. * @return The value set via {@link #setCharset(Charset)} or if no
  5. * call has been made to that method try to obtain if from the
  6. * content type.
  7. *
  8. * @throws UnsupportedEncodingException If the user agent has specified an
  9. * invalid character encoding
  10. */
  11. public Charset getCharset() throws UnsupportedEncodingException {
  12. if (charset == null) {
  13. getCharacterEncoding();
  14. if (characterEncoding != null) {
  15. charset = B2CConverter.getCharset(characterEncoding);
  16. }
  17. }
  18. return charset;
  19. }

代码示例来源:origin: org.apache.tomcat/tomcat-catalina

  1. /**
  2. * @return the character encoding for this Request.
  3. */
  4. @Override
  5. public String getCharacterEncoding() {
  6. String characterEncoding = coyoteRequest.getCharacterEncoding();
  7. if (characterEncoding != null) {
  8. return characterEncoding;
  9. }
  10. Context context = getContext();
  11. if (context != null) {
  12. return context.getRequestCharacterEncoding();
  13. }
  14. return null;
  15. }

代码示例来源:origin: org.ops4j.pax.tipi/org.ops4j.pax.tipi.tomcat-embed-core

  1. /**
  2. * @return the character encoding for this Request.
  3. */
  4. @Override
  5. public String getCharacterEncoding() {
  6. String characterEncoding = coyoteRequest.getCharacterEncoding();
  7. if (characterEncoding != null) {
  8. return characterEncoding;
  9. }
  10. Context context = getContext();
  11. if (context != null) {
  12. return context.getRequestCharacterEncoding();
  13. }
  14. return null;
  15. }

代码示例来源:origin: codefollower/Tomcat-Research

  1. enc = coyoteRequest.getCharacterEncoding();

代码示例来源:origin: com.ovea.tajin.servers/tajin-server-jetty9

  1. protected void setConverter()
  2. throws IOException {
  3. if (coyoteRequest != null)
  4. enc = coyoteRequest.getCharacterEncoding();
  5. gotEnc = true;
  6. if (enc == null)
  7. enc = DEFAULT_ENCODING;
  8. conv = encoders.get(enc);
  9. if (conv == null) {
  10. if (SecurityUtil.isPackageProtectionEnabled()){
  11. try{
  12. conv = AccessController.doPrivileged(
  13. new PrivilegedExceptionAction<B2CConverter>(){
  14. public B2CConverter run() throws IOException {
  15. return new B2CConverter(enc);
  16. }
  17. }
  18. );
  19. }catch(PrivilegedActionException ex){
  20. Exception e = ex.getException();
  21. if (e instanceof IOException)
  22. throw (IOException)e;
  23. }
  24. } else {
  25. conv = new B2CConverter(enc);
  26. }
  27. encoders.put(enc, conv);
  28. }
  29. }

代码示例来源:origin: org.jboss.web/jbossweb

  1. protected void setConverter()
  2. throws IOException {
  3. if (coyoteRequest != null)
  4. enc = coyoteRequest.getCharacterEncoding();
  5. gotEnc = true;
  6. enc = (enc == null) ? DEFAULT_ENCODING : enc.toUpperCase(Locale.US);
  7. conv = encoders.get(enc);
  8. if (conv == null) {
  9. if (SecurityUtil.isPackageProtectionEnabled()) {
  10. try {
  11. conv = (B2CConverter) AccessController
  12. .doPrivileged(new PrivilegedExceptionAction<B2CConverter>() {
  13. public B2CConverter run() throws IOException {
  14. return new B2CConverter(enc);
  15. }
  16. });
  17. } catch (PrivilegedActionException ex) {
  18. Exception e = ex.getException();
  19. if (e instanceof IOException)
  20. throw (IOException) e;
  21. }
  22. } else {
  23. conv = new B2CConverter(enc);
  24. }
  25. encoders.put(enc, conv);
  26. }
  27. }

代码示例来源:origin: tomcat/catalina

  1. protected void setConverter()
  2. throws IOException {
  3. if (coyoteRequest != null)
  4. enc = coyoteRequest.getCharacterEncoding();
  5. gotEnc = true;
  6. if (enc == null)
  7. enc = DEFAULT_ENCODING;
  8. conv = (B2CConverter) encoders.get(enc);
  9. if (conv == null) {
  10. if (SecurityUtil.isPackageProtectionEnabled()){
  11. try{
  12. conv = (B2CConverter)AccessController.doPrivileged(
  13. new PrivilegedExceptionAction(){
  14. public Object run() throws IOException{
  15. return new B2CConverter(enc);
  16. }
  17. }
  18. );
  19. }catch(PrivilegedActionException ex){
  20. Exception e = ex.getException();
  21. if (e instanceof IOException)
  22. throw (IOException)e;
  23. }
  24. } else {
  25. conv = new B2CConverter(enc);
  26. }
  27. encoders.put(enc, conv);
  28. }
  29. }

代码示例来源:origin: com.ovea.tajin.server/tajin-server-tomcat7

  1. protected void setConverter()
  2. throws IOException {
  3. if (coyoteRequest != null)
  4. enc = coyoteRequest.getCharacterEncoding();
  5. gotEnc = true;
  6. if (enc == null)
  7. enc = DEFAULT_ENCODING;
  8. conv = encoders.get(enc);
  9. if (conv == null) {
  10. if (SecurityUtil.isPackageProtectionEnabled()){
  11. try{
  12. conv = AccessController.doPrivileged(
  13. new PrivilegedExceptionAction<B2CConverter>(){
  14. public B2CConverter run() throws IOException {
  15. return new B2CConverter(enc);
  16. }
  17. }
  18. );
  19. }catch(PrivilegedActionException ex){
  20. Exception e = ex.getException();
  21. if (e instanceof IOException)
  22. throw (IOException)e;
  23. }
  24. } else {
  25. conv = new B2CConverter(enc);
  26. }
  27. encoders.put(enc, conv);
  28. }
  29. }

代码示例来源:origin: org.apache.geronimo.ext.tomcat/catalina

  1. enc = coyoteRequest.getCharacterEncoding();

相关文章

Request类方法