Tabnine Logo
ServletRequestContext
Code IndexAdd Tabnine to your IDE (free)

How to use
ServletRequestContext
in
org.apache.tomcat.util.http.fileupload.servlet

Best Java code snippets using org.apache.tomcat.util.http.fileupload.servlet.ServletRequestContext (Showing top 20 results out of 315)

origin: psi-probe/psi-probe

if (FileUploadBase.isMultipartContent(new ServletRequestContext(request))) {
 upload.setHeaderEncoding(StandardCharsets.UTF_8.name());
 try {
  List<FileItem> fileItems = upload.parseRequest(new ServletRequestContext(request));
  for (FileItem fi : fileItems) {
   if (!fi.isFormField()) {
origin: codefollower/Tomcat-Research

/**
 * Returns a string representation of this object.
 *
 * @return a string representation of this object.
 */
@Override
public String toString() {
  return String.format("ContentLength=%s, ContentType=%s",
         Long.valueOf(this.contentLength()),
         this.getContentType());
}
origin: com.ovea.tajin.server/tajin-server-tomcat7

  /**
   * Returns a string representation of this object.
   *
   * @return a string representation of this object.
   */
  @Override
  public String toString() {
    return "ContentLength="
      + this.getContentLength()
      + ", ContentType="
      + this.getContentType();
  }
}
origin: psi-probe/psi-probe

 HttpServletResponse response) throws Exception {
if (FileUploadBase.isMultipartContent(new ServletRequestContext(request))) {
 upload.setHeaderEncoding(StandardCharsets.UTF_8.name());
 try {
  List<FileItem> fileItems = upload.parseRequest(new ServletRequestContext(request));
  for (FileItem fi : fileItems) {
   if (!fi.isFormField()) {
origin: org.ops4j.pax.tipi/org.ops4j.pax.tipi.tomcat-embed-core

/**
 * Returns a string representation of this object.
 *
 * @return a string representation of this object.
 */
@Override
public String toString() {
  return String.format("ContentLength=%s, ContentType=%s",
         Long.valueOf(this.contentLength()),
         this.getContentType());
}
origin: org.apache.coyote/com.springsource.org.apache.coyote

  /**
   * Returns a string representation of this object.
   *
   * @return a string representation of this object.
   */
  @Override
  public String toString() {
    return "ContentLength="
      + this.getContentLength()
      + ", ContentType="
      + this.getContentType();
  }
}
origin: org.apache.geronimo.ext.tomcat/util

/**
 * Utility method that determines whether the request contains multipart
 * content.
 *
 * @param request The servlet request to be evaluated. Must be non-null.
 *
 * @return <code>true</code> if the request is multipart;
 *         <code>false</code> otherwise.
 */
public static final boolean isMultipartContent(
    HttpServletRequest request) {
  if (!POST_METHOD.equalsIgnoreCase(request.getMethod())) {
    return false;
  }
  return FileUploadBase.isMultipartContent(new ServletRequestContext(request));
}
origin: org.apache.geronimo.ext.tomcat/util

/**
 * Returns a string representation of this object.
 *
 * @return a string representation of this object.
 */
@Override
public String toString() {
  return String.format("ContentLength=%s, ContentType=%s",
         Long.valueOf(this.contentLength()),
         this.getContentType());
}
origin: org.jboss.web/jbossweb

  /**
   * Returns a string representation of this object.
   *
   * @return a string representation of this object.
   */
  @Override
  public String toString() {
    return "ContentLength="
      + this.getContentLength()
      + ", ContentType="
      + this.getContentType();
  }
}
origin: org.apache.coyote/com.springsource.org.apache.coyote

/**
 * Processes an <a href="http://www.ietf.org/rfc/rfc1867.txt">RFC 1867</a>
 * compliant <code>multipart/form-data</code> stream.
 *
 * @param request The servlet request to be parsed.
 *
 * @return A list of <code>FileItem</code> instances parsed from the
 *         request, in the order that they were transmitted.
 *
 * @throws FileUploadException if there are problems reading/parsing
 *                             the request or storing files.
 */
public List<FileItem> parseRequest(HttpServletRequest request)
throws FileUploadException {
  return parseRequest(new ServletRequestContext(request));
}
origin: org.jboss.web/jbossweb

/**
 * Processes an <a href="http://www.ietf.org/rfc/rfc1867.txt">RFC 1867</a>
 * compliant <code>multipart/form-data</code> stream.
 *
 * @param request The servlet request to be parsed.
 *
 * @return A list of <code>FileItem</code> instances parsed from the
 *         request, in the order that they were transmitted.
 *
 * @throws FileUploadException if there are problems reading/parsing
 *                             the request or storing files.
 */
public List<FileItem> parseRequest(HttpServletRequest request)
throws FileUploadException {
  return parseRequest(new ServletRequestContext(request));
}
origin: codefollower/Tomcat-Research

/**
 * Utility method that determines whether the request contains multipart
 * content.
 *
 * @param request The servlet request to be evaluated. Must be non-null.
 *
 * @return <code>true</code> if the request is multipart;
 *         <code>false</code> otherwise.
 */
public static final boolean isMultipartContent(
    HttpServletRequest request) {
  if (!POST_METHOD.equalsIgnoreCase(request.getMethod())) {
    return false;
  }
  return FileUploadBase.isMultipartContent(new ServletRequestContext(request));
}
origin: com.ovea.tajin.server/tajin-server-tomcat7

/**
 * Processes an <a href="http://www.ietf.org/rfc/rfc1867.txt">RFC 1867</a>
 * compliant <code>multipart/form-data</code> stream.
 *
 * @param request The servlet request to be parsed.
 *
 * @return A list of <code>FileItem</code> instances parsed from the
 *         request, in the order that they were transmitted.
 *
 * @throws FileUploadException if there are problems reading/parsing
 *                             the request or storing files.
 */
public List<FileItem> parseRequest(HttpServletRequest request)
throws FileUploadException {
  return parseRequest(new ServletRequestContext(request));
}
origin: org.ops4j.pax.tipi/org.ops4j.pax.tipi.tomcat-embed-core

/**
 * Utility method that determines whether the request contains multipart
 * content.
 *
 * @param request The servlet request to be evaluated. Must be non-null.
 *
 * @return <code>true</code> if the request is multipart;
 *         <code>false</code> otherwise.
 */
public static final boolean isMultipartContent(
    HttpServletRequest request) {
  if (!POST_METHOD.equalsIgnoreCase(request.getMethod())) {
    return false;
  }
  return FileUploadBase.isMultipartContent(new ServletRequestContext(request));
}
origin: codefollower/Tomcat-Research

/**
 * Processes an <a href="http://www.ietf.org/rfc/rfc1867.txt">RFC 1867</a>
 * compliant <code>multipart/form-data</code> stream.
 *
 * @param request The servlet request to be parsed.
 *
 * @return A map of <code>FileItem</code> instances parsed from the request.
 *
 * @throws FileUploadException if there are problems reading/parsing
 *                             the request or storing files.
 *
 * @since 1.3
 */
public Map<String, List<FileItem>> parseParameterMap(HttpServletRequest request)
    throws FileUploadException {
  return parseParameterMap(new ServletRequestContext(request));
}
origin: org.apache.geronimo.ext.tomcat/util

/**
 * Processes an <a href="http://www.ietf.org/rfc/rfc1867.txt">RFC 1867</a>
 * compliant <code>multipart/form-data</code> stream.
 *
 * @param request The servlet request to be parsed.
 *
 * @return A map of <code>FileItem</code> instances parsed from the request.
 *
 * @throws FileUploadException if there are problems reading/parsing
 *                             the request or storing files.
 *
 * @since 1.3
 */
public Map<String, List<FileItem>> parseParameterMap(HttpServletRequest request)
    throws FileUploadException {
  return parseParameterMap(new ServletRequestContext(request));
}
origin: org.ops4j.pax.tipi/org.ops4j.pax.tipi.tomcat-embed-core

/**
 * Processes an <a href="http://www.ietf.org/rfc/rfc1867.txt">RFC 1867</a>
 * compliant <code>multipart/form-data</code> stream.
 *
 * @param request The servlet request to be parsed.
 *
 * @return A map of <code>FileItem</code> instances parsed from the request.
 *
 * @throws FileUploadException if there are problems reading/parsing
 *                             the request or storing files.
 *
 * @since 1.3
 */
public Map<String, List<FileItem>> parseParameterMap(HttpServletRequest request)
    throws FileUploadException {
  return parseParameterMap(new ServletRequestContext(request));
}
origin: codefollower/Tomcat-Research

/**
 * Processes an <a href="http://www.ietf.org/rfc/rfc1867.txt">RFC 1867</a>
 * compliant <code>multipart/form-data</code> stream.
 *
 * @param request The servlet request to be parsed.
 *
 * @return An iterator to instances of <code>FileItemStream</code>
 *         parsed from the request, in the order that they were
 *         transmitted.
 *
 * @throws FileUploadException if there are problems reading/parsing
 *                             the request or storing files.
 * @throws IOException An I/O error occurred. This may be a network
 *   error while communicating with the client or a problem while
 *   storing the uploaded content.
 */
public FileItemIterator getItemIterator(HttpServletRequest request)
throws FileUploadException, IOException {
  return super.getItemIterator(new ServletRequestContext(request));
}
origin: org.apache.geronimo.ext.tomcat/util

/**
 * Processes an <a href="http://www.ietf.org/rfc/rfc1867.txt">RFC 1867</a>
 * compliant <code>multipart/form-data</code> stream.
 *
 * @param request The servlet request to be parsed.
 *
 * @return An iterator to instances of <code>FileItemStream</code>
 *         parsed from the request, in the order that they were
 *         transmitted.
 *
 * @throws FileUploadException if there are problems reading/parsing
 *                             the request or storing files.
 * @throws IOException An I/O error occurred. This may be a network
 *   error while communicating with the client or a problem while
 *   storing the uploaded content.
 */
public FileItemIterator getItemIterator(HttpServletRequest request)
throws FileUploadException, IOException {
  return super.getItemIterator(new ServletRequestContext(request));
}
origin: org.ops4j.pax.tipi/org.ops4j.pax.tipi.tomcat-embed-core

/**
 * Processes an <a href="http://www.ietf.org/rfc/rfc1867.txt">RFC 1867</a>
 * compliant <code>multipart/form-data</code> stream.
 *
 * @param request The servlet request to be parsed.
 *
 * @return An iterator to instances of <code>FileItemStream</code>
 *         parsed from the request, in the order that they were
 *         transmitted.
 *
 * @throws FileUploadException if there are problems reading/parsing
 *                             the request or storing files.
 * @throws IOException An I/O error occurred. This may be a network
 *   error while communicating with the client or a problem while
 *   storing the uploaded content.
 */
public FileItemIterator getItemIterator(HttpServletRequest request)
throws FileUploadException, IOException {
  return super.getItemIterator(new ServletRequestContext(request));
}
org.apache.tomcat.util.http.fileupload.servletServletRequestContext

Javadoc

Provides access to the request information needed for a request made to an HTTP servlet.

Most used methods

  • <init>
    Construct a context for this request.
  • getContentType
    Retrieve the content type of the request.
  • contentLength
    Retrieve the content length of the request.
  • getContentLength
    Retrieve the content length of the request.

Popular in Java

  • Creating JSON documents from java classes using gson
  • onCreateOptionsMenu (Activity)
  • getSharedPreferences (Context)
  • getExternalFilesDir (Context)
  • FileWriter (java.io)
    A specialized Writer that writes to a file in the file system. All write requests made by calling me
  • SocketTimeoutException (java.net)
    This exception is thrown when a timeout expired on a socket read or accept operation.
  • MessageDigest (java.security)
    Uses a one-way hash function to turn an arbitrary number of bytes into a fixed-length byte sequence.
  • SecureRandom (java.security)
    This class generates cryptographically secure pseudo-random numbers. It is best to invoke SecureRand
  • HttpServlet (javax.servlet.http)
    Provides an abstract class to be subclassed to create an HTTP servlet suitable for a Web site. A sub
  • FileUtils (org.apache.commons.io)
    General file manipulation utilities. Facilities are provided in the following areas: * writing to a
  • Top plugins for Android Studio
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now