You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by bu...@apache.org on 2003/05/02 18:46:31 UTC

DO NOT REPLY [Bug 19602] New: - Allow users of ant deploy to set the docBase of the Context

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=19602>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=19602

Allow users of ant deploy to set the docBase of the Context

           Summary: Allow users of ant deploy to set the docBase of the
                    Context
           Product: Tomcat 5
           Version: 5.0.1
          Platform: All
        OS/Version: Other
            Status: NEW
          Severity: Enhancement
          Priority: Other
         Component: Catalina
        AssignedTo: tomcat-dev@jakarta.apache.org
        ReportedBy: johannes.fiala@fwd.at


CURRENT STATE:
It is not possible to set the docBase to a specific value. The docBase 
parameter is always calculated at StandardHostDeployer.java and cannot be set 
by the user by setting the docBase-attribute at context.xml.

ENHANCEMENT:
I changed StandardHostDeployer.java to check whether the parameter 
overrideDocBase is set to false. If this is the case, I do not override the 
docBase, but use the docBase set by the user at context.xml.
line 446ff.
public synchronized void install(URL config, URL war) throws IOException {

I also needed some additional libraries, which I added at the top.
The changes have been marked with comments.

I suspect the first install routine at line 356 may also need some changes, but 
I don't know how to test it and so I left it unchanged. Additionally, I am 
satisfied with the change of the install routine at line 446ff.

USE CASE:
ant deploy with a context.xml with
<Context overrideDocBase="false" docBase="c:\...\XXX.war" ...>
will set the docBase to XXX.war at the server side.

overrideDocBase="true" or omitting overrideDocBase will use the default 
behaviour.

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org