gpt4 book ai didi

org.apache.catalina.WebResource.delete()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-26 12:49:05 27 4
gpt4 key购买 nike

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

WebResource.delete介绍

[英]See java.io.File#delete().
[中]参见java。伊奥。文件#删除()。

代码示例

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

@Override
public boolean delete() {
  return webResource.delete();
}

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

@Override
public boolean delete() {
  boolean deleteResult = webResource.delete();
  if (deleteResult) {
    cache.removeCacheEntry(webAppPath);
  }
  return deleteResult;
}

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

@Override
public boolean delete() {
  boolean deleteResult = webResource.delete();
  if (deleteResult) {
    cache.removeCacheEntry(webAppPath);
  }
  return deleteResult;
}

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

/**
 * Process a DELETE request for the specified resource.
 *
 * @param req The servlet request we are processing
 * @param resp The servlet response we are creating
 *
 * @exception IOException if an input/output error occurs
 * @exception ServletException if a servlet-specified error occurs
 */
@Override
protected void doDelete(HttpServletRequest req, HttpServletResponse resp)
  throws ServletException, IOException {
  if (readOnly) {
    resp.sendError(HttpServletResponse.SC_FORBIDDEN);
    return;
  }
  String path = getRelativePath(req);
  WebResource resource = resources.getResource(path);
  if (resource.exists()) {
    if (resource.delete()) {
      resp.setStatus(HttpServletResponse.SC_NO_CONTENT);
    } else {
      resp.sendError(HttpServletResponse.SC_METHOD_NOT_ALLOWED);
    }
  } else {
    resp.sendError(HttpServletResponse.SC_NOT_FOUND);
  }
}

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

if (!resource.delete()) {
  resp.sendError(WebdavStatus.SC_INTERNAL_SERVER_ERROR);
  return false;
if (!resource.delete()) {
  errorList.put(path, Integer.valueOf
    (WebdavStatus.SC_INTERNAL_SERVER_ERROR));

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

/**
 * Process a DELETE request for the specified resource.
 *
 * @param req The servlet request we are processing
 * @param resp The servlet response we are creating
 *
 * @exception IOException if an input/output error occurs
 * @exception ServletException if a servlet-specified error occurs
 */
@Override
protected void doDelete(HttpServletRequest req, HttpServletResponse resp)
  throws ServletException, IOException {
  if (readOnly) {
    sendNotAllowed(req, resp);
    return;
  }
  String path = getRelativePath(req);
  WebResource resource = resources.getResource(path);
  if (resource.exists()) {
    if (resource.delete()) {
      resp.setStatus(HttpServletResponse.SC_NO_CONTENT);
    } else {
      resp.sendError(HttpServletResponse.SC_METHOD_NOT_ALLOWED);
    }
  } else {
    resp.sendError(HttpServletResponse.SC_NOT_FOUND);
  }
}

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

if (!resource.delete()) {
  resp.sendError(WebdavStatus.SC_INTERNAL_SERVER_ERROR);
  return false;
if (!resource.delete()) {
  errorList.put(path, Integer.valueOf
    (WebdavStatus.SC_INTERNAL_SERVER_ERROR));

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

if (!resource.delete()) {
  resp.sendError(WebdavStatus.SC_INTERNAL_SERVER_ERROR);
  return false;
if (!resource.delete()) {
  errorList.put(path, new Integer
    (WebdavStatus.SC_INTERNAL_SERVER_ERROR));

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

/**
 * Process a DELETE request for the specified resource.
 *
 * @param req The servlet request we are processing
 * @param resp The servlet response we are creating
 *
 * @exception IOException if an input/output error occurs
 * @exception ServletException if a servlet-specified error occurs
 */
@Override
protected void doDelete(HttpServletRequest req, HttpServletResponse resp)
  throws ServletException, IOException {
  if (readOnly) {
    sendNotAllowed(req, resp);
    return;
  }
  String path = getRelativePath(req);
  WebResource resource = resources.getResource(path);
  if (resource.exists()) {
    if (resource.delete()) {
      resp.setStatus(HttpServletResponse.SC_NO_CONTENT);
    } else {
      resp.sendError(HttpServletResponse.SC_METHOD_NOT_ALLOWED);
    }
  } else {
    resp.sendError(HttpServletResponse.SC_NOT_FOUND);
  }
}

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

if (!childResource.delete()) {
  if (!childResource.isDirectory()) {

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

if (!childResource.delete()) {
  if (!childResource.isDirectory()) {

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

if (!childResource.delete()) {
  if (!childResource.isDirectory()) {

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com