You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by Johannes Fiala <to...@fwd.at> on 2003/05/01 14:21:16 UTC

Guidance in changing StandardHostDeployer.java needed

Hi there,

Basic problem: I want to be able to have a pseudo-context, which is able 
to point to other Contexts to perform a runtime-versioning of an 
application. This should suffice to reach the target of high availability 
of an app without any downtime experiences for the end users.

Diagnosis:
It seems it would be a good thing to have a normal context and set the 
docBase in context.xml during deployment using ant.
Am I right here? Does this raise security issues?

Suggested solution:
allow a new parameter in context.xml: 
<Context ... 
requestdocBase="/work/Standalone/localhost/manager/myapp-1.1.war" />
I think it should be a new parameter, because otherwise people would 
accidentally set the docBase when copying their Context configuration to 
context.xml.

Needed changes:
line 297:
Context context = (Context) clazz.newInstance();
*) how could I access the new attribute requestdocBase? Is there an easy 
way/would a new attribut get exposed automatically?

line 299:
// override the computed docBase if user explicitly requests another 
docBase using the requestdocBase-attribute
if (requestdocBase!=null) {
            context.setDocBase(requestdocBase);
} else {
            context.setDocBase(docBase);
}

this would be the minimal-impact addition to the java-File.

What this make sense? If yes, I'll look at the TC 5.x source to suggest 
the changes required there.

Johannes