tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Johannes Fiala" <tomcat-...@fwd.at>
Subject Fw: Guidance in changing StandardHostDeployer.java needed - extended
Date Thu, 01 May 2003 14:00:20 GMT
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 ... 
overridedocBase="true" />
overridedocBase=true => will set the docBase dynamically computed while 
deploying the WAR file.
overridedocBase=false => will set the docBase as specificied in 
context.xml (will leave it unchanged)

Needed changes:
line 297:
Context context = (Context) clazz.newInstance();
*) how could I access the new attribute overridedocBase? Is there an easy 
way/would a new attribut get exposed automatically? Or can I parse 
context.xml before installing the new war file easily?

line 299 + 377:
if (overridedocBase.equals("true")) {
  // use the dynamically computed docBase
} else {
  // do not override, use docBase attribute of context.xml
}

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
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message