Package org.apache.catalina.util

Examples of org.apache.catalina.util.ContextName


    */
   private void deleteWar(final Archive<?> archive)
   {
      if (configuration.isUnpackArchive())
      {
         final ContextName contextName = getContextName(archive);
         final File unpackDir = new File(host.getAppBase(), contextName.getBaseName());
         if (unpackDir.exists())
         {
            ExpandWar.deleteDir(unpackDir);
         }
      }
View Full Code Here


    }


    @Override
    public String getBaseName() {
        return new ContextName(path, webappVersion).getBaseName();
    }
View Full Code Here

        // By obtaining the command from the pathInfo, per-command security can
        // be configured in web.xml
        String command = request.getPathInfo();

        String path = request.getParameter("path");
        ContextName cn = null;
        if (path != null) {
            cn = new ContextName(path, request.getParameter("version"));
        }

        // Prepare our output writer to generate the response message
        response.setContentType("text/html; charset=" + Constants.CHARSET);
View Full Code Here

        // By obtaining the command from the pathInfo, per-command security can
        // be configured in web.xml
        String command = request.getPathInfo();

        String path = request.getParameter("path");
        ContextName cn = null;
        if (path != null) {
            cn = new ContextName(path, request.getParameter("version"));
        }
        String deployPath = request.getParameter("deployPath");
        ContextName deployCn = null;
        if (deployPath != null) {
            deployCn = new ContextName(deployPath,
                    request.getParameter("deployVersion"));
        }
        String deployConfig = request.getParameter("deployConfig");
        String deployWar = request.getParameter("deployWar");
View Full Code Here

                            "htmlManagerServlet.deployUploadWarExists",
                            filename);
                    break;
                }
               
                ContextName cn = new ContextName(filename);
                String name = cn.getName();

                if ((host.findChild(name) != null) && !isDeployed(name)) {
                    message = smClient.getString(
                            "htmlManagerServlet.deployUploadInServerXml",
                            filename);
View Full Code Here

     */
    protected void deployApps(String name) {

        File appBase = appBase();
        File configBase = configBase();
        ContextName cn = new ContextName(name);
        String baseName = cn.getBaseName();
       
        // Deploy XML descriptors from configBase
        File xml = new File(configBase, baseName + ".xml");
        if (xml.exists())
            deployDescriptor(cn, xml, baseName + ".xml");
View Full Code Here

       
        for (int i = 0; i < files.length; i++) {
            File contextXml = new File(configBase, files[i]);

            if (files[i].toLowerCase(Locale.ENGLISH).endsWith(".xml")) {
                ContextName cn = new ContextName(files[i]);
                String name = cn.getName();

                if (isServiced(name))
                    continue;
               
                String file = files[i];
View Full Code Here

                continue;
            File dir = new File(appBase, files[i]);
            if (files[i].toLowerCase(Locale.ENGLISH).endsWith(".war") && dir.isFile()
                    && !invalidWars.contains(files[i]) ) {
               
                ContextName cn = new ContextName(files[i]);
               
                // Check for WARs with /../ /./ or similar sequences in the name
                if (!validateContextPath(appBase, cn.getBaseName())) {
                    log.error(sm.getString(
                            "hostConfig.illegalWarName", files[i]));
                    invalidWars.add(files[i]);
                    continue;
                }

                if (isServiced(cn.getName()))
                    continue;
               
                String file = files[i];
               
                deployWAR(cn, dir, file);
View Full Code Here

                continue;
            if (files[i].equalsIgnoreCase("WEB-INF"))
                continue;
            File dir = new File(appBase, files[i]);
            if (dir.isDirectory()) {
                ContextName cn = new ContextName(files[i]);

                if (isServiced(cn.getName()))
                    continue;

                deployDirectory(cn, dir, files[i]);
            }
        }
View Full Code Here

            // Trying to guess the docBase according to the path
            String path = context.getPath();
            if (path == null) {
                return;
            }
            ContextName cn = new ContextName(path, context.getWebappVersion());
            docBase = cn.getBaseName();
        }

        File file = new File(docBase);
        if (!file.isAbsolute()) {
            docBase = (new File(canonicalAppBase, docBase)).getPath();
        } else {
            docBase = file.getCanonicalPath();
        }
        file = new File(docBase);
        String origDocBase = docBase;

        ContextName cn = new ContextName(context.getPath(),
                context.getWebappVersion());
        String pathName = cn.getBaseName();

        boolean unpackWARs = true;
        if (host instanceof StandardHost) {
            unpackWARs = ((StandardHost) host).isUnpackWARs();
            if (unpackWARs && context instanceof StandardContext) {
View Full Code Here

TOP

Related Classes of org.apache.catalina.util.ContextName

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.