Bug 32505 - Deploy of a file url fails
Summary: Deploy of a file url fails
Alias: None
Product: Tomcat 5
Classification: Unclassified
Component: Webapps:Manager (show other bugs)
Version: 5.5.4
Hardware: PC Windows XP
: P2 normal (vote)
Target Milestone: ---
Assignee: Tomcat Developers Mailing List
Depends on:
Reported: 2004-12-02 23:46 UTC by Tim Schafer
Modified: 2004-12-06 08:01 UTC (History)
0 users


Note You need to log in before you can comment on or make changes to this bug.
Description Tim Schafer 2004-12-02 23:46:33 UTC
Using tomcat 5.0.27 I can use the manager app to deploy another app
that is in a directory on my local computer by secifying the dir as a file url
in the text entry labeled WAR or Directory URL:

In tomcat 5.5.4 this fails with:
FAIL - Invalid context path  was specified
when I do not specify a context path.

When I do specify a context path:
a diretory is created in
C:\Program Files\Apache Software Foundation\Tomcat 5.5\conf\Catalina\localhost
in that directory looks like the beggining of a copy of my c:\ dir
but the app is not deployed
Comment 1 Remy Maucherat 2004-12-02 23:54:24 UTC
This will not be fixed.

*** This bug has been marked as a duplicate of 32418 ***
Comment 2 Tim Schafer 2004-12-03 00:23:41 UTC

And if the bug isn't going to fixed, then why does the manager still support
providing a URL to a directory?

I can still deploy a webapp already in exploded form by manually putting a
context xml file in conf\Catalina\localhost

It is very useful for development to deploy a webapp being worked on in place.
Why has the manager been cutback?
Comment 3 Remy Maucherat 2004-12-03 16:03:06 UTC
Ok. You need to write simpler stuff in bug reports when you can, so that the
issues cannot be confused. I will adress the issue.
Comment 4 Remy Maucherat 2004-12-06 17:01:53 UTC
I thought I had marked this as fixed earlier. Odd.
The problem was that the context attribute was not handled properly if it was
present but empty (and since an empty path is the root of the filesystem, at
least on Windows ...). The patch is very simple.

  RCS file:
  retrieving revision 1.22
  retrieving revision 1.23
  diff -u -r1.22 -r1.23
  --- ManagerServlet.java	23 Sep 2004 07:03:27 -0000	1.22
  +++ ManagerServlet.java	3 Dec 2004 15:35:25 -0000	1.23
  @@ -737,6 +737,9 @@
       protected void deploy(PrintWriter writer, String config,
               String path, String war, boolean update) {
  +        if (config != null && config.length() == 0) {
  +            config = null;
  +        }
           if (war != null && war.length() == 0) {
               war = null;