Undeploy fails for any app that's not installed under webapps directory. For example, an attempt to undeploy /admin will fail with "Cannot undeploy document base for path /admin" because of the following lines from ManagerServlet line 1384

            // Validate the docBase path of this application
            String deployedPath = deployed.getCanonicalPath();
            String docBase = context.getDocBase();
            File docBaseDir = new File(docBase);
            if (!docBaseDir.isAbsolute()) {
                docBaseDir = new File(appBaseDir, docBase);
            }
            String docBasePath = docBaseDir.getCanonicalPath();
            if (!docBasePath.startsWith(deployedPath)) {
                writer.println(sm.getString("managerServlet.noDocBase",
                                            displayPath));
                return;
            }

Any app that's installed using context configuration file with docBase other than "../webapps" will not pass the condition since deployedPath is always ../webapps.

What is the reasoning behind this validation?

Thanks,
Amy



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to