Examples of ContextName


Examples of org.apache.catalina.util.ContextName

           
            String path = context.getPath();
            if (path == null) {
                return;
            }
            ContextName cn = new ContextName(path, context.getWebappVersion());
            docBase = cn.getBaseName();

            File file = null;
            if (docBase.toLowerCase(Locale.ENGLISH).endsWith(".war")) {
                // TODO - This is never executed. Bug or code to delete?
                file = new File(System.getProperty("java.io.tmpdir"),
View Full Code Here

Examples of org.apache.catalina.util.ContextName

      removeServiced(contextName);
   }

   private String getContextName(final String warFileName)
   {
      final ContextName contextName = new ContextName(warFileName);
      return contextName.getName();
   }
View Full Code Here

Examples of org.apache.catalina.util.ContextName

         final File archiveFile = new File(appBase, archive.getName());
         archive.as(ZipExporter.class).exportTo(archiveFile, true);

         embeddedHostConfig.deployWAR(archive.getName());

         final ContextName contextName = getContextName(archive);
         final StandardContext standardContext = (StandardContext) host.findChild(contextName.getName());
         standardContextProducer.set(standardContext);

         final HTTPContext httpContext = new HTTPContext(configuration.getBindAddress(),
               configuration.getBindHttpPort());

         for (String mapping : standardContext.findServletMappings())
         {
            httpContext.add(new Servlet(standardContext.findServletMapping(mapping), contextName.getPath()));
         }

         return new ProtocolMetaData().addContext(httpContext);
      }
      catch (Exception e)
View Full Code Here

Examples of org.apache.catalina.util.ContextName

    * @param archive the Arquillian archive.
    * @return the Tomcat context name helper.
    */
   private ContextName getContextName(final Archive<?> archive)
   {
      return new ContextName(archive.getName());
   }
View Full Code Here

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

Examples of org.apache.catalina.util.ContextName

    }


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

Examples of org.apache.catalina.util.ContextName

        // 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

Examples of org.apache.catalina.util.ContextName

        // 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

Examples of org.apache.catalina.util.ContextName

                            "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

Examples of org.apache.catalina.util.ContextName

     */
    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
TOP
Copyright © 2018 www.massapi.com. 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.