ResponseIncludeWrapper.setContentType
Code IndexAdd Codota to your IDE (free)

Best Java code snippets using org.apache.catalina.ssi.ResponseIncludeWrapper.setContentType (Showing top 9 results out of 315)

  • Common ways to obtain ResponseIncludeWrapper
private void myMethod () {
ResponseIncludeWrapper r =
  • ServletContext context;HttpServletRequest request;HttpServletResponse response;ServletOutputStream captureServletOutputStream;new ResponseIncludeWrapper(context, request, response, captureServletOutputStream)
  • Smart code suggestions by Codota
}
origin: org.apache.geronimo.ext.tomcat/catalina

/**
 * Returns the value of the <code>content-type</code> header field.
 *
 * @return the content type of the resource referenced by this
 *   <code>ResponseIncludeWrapper</code>, or <code>null</code> if not known.
 */
@Override
public String getContentType() {
  if (contentType == null) {
    String url = request.getRequestURI();
    String mime = context.getMimeType(url);
    if (mime != null) {
      setContentType(mime);
    } else {
      // return a safe value
      setContentType("application/x-octet-stream");
    }
  }
  return contentType;
}

origin: codefollower/Tomcat-Research

/**
 * Returns the value of the <code>content-type</code> header field.
 *
 * @return the content type of the resource referenced by this
 *   <code>ResponseIncludeWrapper</code>, or <code>null</code> if not known.
 */
@Override
public String getContentType() {
  if (contentType == null) {
    String url = request.getRequestURI();
    String mime = context.getMimeType(url);
    if (mime != null) {
      setContentType(mime);
    } else {
      // return a safe value
      setContentType("application/x-octet-stream");
    }
  }
  return contentType;
}
origin: com.ovea.tajin.server/tajin-server-jetty9

/**
 * Returns the value of the <code>content-type</code> header field.
 *
 * @return the content type of the resource referenced by this
 *   <code>ResponseIncludeWrapper</code>, or <code>null</code> if not known.
 */
@Override
public String getContentType() {
  if (contentType == null) {
    String url = request.getRequestURI();
    String mime = context.getMimeType(url);
    if (mime != null) {
      setContentType(mime);
    } else {
      // return a safe value
      setContentType("application/x-octet-stream");
    }
  }
  return contentType;
}
 
origin: org.jboss.web/jbossweb

/**
 * Returns the value of the <code>content-type</code> header field.
 *
 * @return the content type of the resource referenced by this
 *   <code>ResponseIncludeWrapper</code>, or <code>null</code> if not known.
 */
public String getContentType() {
  if (contentType == null) {
    String url = request.getRequestURI();
    String mime = context.getMimeType(url);
    if (mime != null)
    {
      setContentType(mime);
    }
    else
    {
      // return a safe value
      setContentType("application/x-octet-stream");
    }
  }
  return contentType;
}

origin: org.apache.catalina/com.springsource.org.apache.catalina

/**
 * Returns the value of the <code>content-type</code> header field.
 *
 * @return the content type of the resource referenced by this
 *   <code>ResponseIncludeWrapper</code>, or <code>null</code> if not known.
 */
@Override
public String getContentType() {
  if (contentType == null) {
    String url = request.getRequestURI();
    String mime = context.getMimeType(url);
    if (mime != null) {
      setContentType(mime);
    } else {
      // return a safe value
      setContentType("application/x-octet-stream");
    }
  }
  return contentType;
}
 
origin: com.ovea.tajin.servers/tajin-server-jetty9

/**
 * Returns the value of the <code>content-type</code> header field.
 *
 * @return the content type of the resource referenced by this
 *   <code>ResponseIncludeWrapper</code>, or <code>null</code> if not known.
 */
@Override
public String getContentType() {
  if (contentType == null) {
    String url = request.getRequestURI();
    String mime = context.getMimeType(url);
    if (mime != null) {
      setContentType(mime);
    } else {
      // return a safe value
      setContentType("application/x-octet-stream");
    }
  }
  return contentType;
}
 
origin: com.ovea.tajin.server/tajin-server-tomcat7

/**
 * Returns the value of the <code>content-type</code> header field.
 *
 * @return the content type of the resource referenced by this
 *   <code>ResponseIncludeWrapper</code>, or <code>null</code> if not known.
 */
@Override
public String getContentType() {
  if (contentType == null) {
    String url = request.getRequestURI();
    String mime = context.getMimeType(url);
    if (mime != null) {
      setContentType(mime);
    } else {
      // return a safe value
      setContentType("application/x-octet-stream");
    }
  }
  return contentType;
}
 
origin: org.glassfish.main.web/web-core

/**
 * Returns the value of the <code>content-type</code> header field.
 *
 * @return the content type of the resource referenced by this
 *   <code>ResponseIncludeWrapper</code>, or <code>null</code> if not known.
 */
public String getContentType() {
  if (contentType == null) {
    String url = request.getRequestURI();
    String mime = context.getMimeType(url);
    if (mime != null)
    {
      setContentType(mime);
    }
    else
    {
      // return a safe value
      setContentType("application/x-octet-stream");
    }
  }
  return contentType;
}

origin: jboss.web/jbossweb

/**
 * Returns the value of the <code>content-type</code> header field.
 *
 * @return the content type of the resource referenced by this
 *   <code>ResponseIncludeWrapper</code>, or <code>null</code> if not known.
 */
public String getContentType() {
  if (contentType == null) {
    String url = request.getRequestURI();
    String mime = context.getMimeType(url);
    if (mime != null)
    {
      setContentType(mime);
    }
    else
    {
      // return a safe value
      setContentType("application/x-octet-stream");
    }
  }
  return contentType;
}

org.apache.catalina.ssiResponseIncludeWrappersetContentType

Javadoc

Sets the value of the content-type header field.

Popular methods of ResponseIncludeWrapper

  • <init>
    Initialize our wrapper with the current HttpServletResponse and ServletOutputStream.
  • flushOutputStreamOrWriter
    Flush the servletOutputStream or printWriter ( only one will be non-null ) This must be called after
  • getCharacterEncoding
  • getContentType
    Returns the value of the content-type header field.
  • getLastModified
    Returns the value of the last-modified header field. The result is the number of milliseconds since
  • setCharacterEncoding
  • getResponse

Popular in Java

  • Running tasks concurrently on multiple threads
  • scheduleAtFixedRate (Timer)
  • setRequestProperty (URLConnection)
  • startActivity (Activity)
  • HttpServer (com.sun.net.httpserver)
    This class implements a simple HTTP server. A HttpServer is bound to an IP address and port number a
  • Container (java.awt)
    A generic Abstract Window Toolkit(AWT) container object is a component that can contain other AWT co
  • SQLException (java.sql)
    An exception that indicates a failed JDBC operation. It provides the following information about pro
  • IOUtils (org.apache.commons.io)
    General IO stream manipulation utilities. This class provides static utility methods for input/outpu
  • Runner (org.openjdk.jmh.runner)
  • Reflections (org.reflections)
    Reflections one-stop-shop objectReflections scans your classpath, indexes the metadata, allows you t

For IntelliJ IDEA,
Android Studio or Eclipse

  • Search for JavaScript code betaCodota IntelliJ IDEA pluginCodota Android Studio pluginCode IndexSign in
  • EnterpriseFAQAboutBlogContact Us
  • Plugin user guideTerms of usePrivacy policyCodeboxFind Usages
Add Codota to your IDE (free)