This is required for when the web app is not run from a war but
unpacked into the appDir for the Host.

I think it is a reasonable restriction to require that a web application
be placed in the appDir configured for the Host.  When you are running
with the SecurityManager this can make setting the security policy easier.

Glenn

Amy Roh wrote:
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]



--
----------------------------------------------------------------------
Glenn Nielsen             [EMAIL PROTECTED] | /* Spelin donut madder    |
MOREnet System Programming               |  * if iz ina coment.      |
Missouri Research and Education Network  |  */                       |
----------------------------------------------------------------------


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



Reply via email to