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 2002/06/14 21:16:41 UTC
DO NOT REPLY [Bug 7374] -
Apache Tomcat/4.0.1 message on standard output
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=7374>.
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=7374
Apache Tomcat/4.0.1 message on standard output
------- Additional Comments From noah.green@corp.palm.com 2002-06-14 19:16 -------
Hi,
I take it you are doing embedded Tomcat and that is why you don't want to see
the output. Below is a workaround: a substitute Engine class that does
everything the original engine does, except producing that output.
Hope this helps,
Noah
package com.palm.aegis.web;
import java.io.IOException;
import javax.servlet.*;
import javax.servlet.http.*;
import org.apache.catalina.*;
import org.apache.catalina.core.*;
import org.apache.catalina.startup.*;
/**
* Overrides StandardEngine just so we don't get the mandatory
* System.out.println ("Apache/Jakarta 1.0.2") junk when start()
* gets called.
*/
public class NewEngine extends StandardEngine
{
public NewEngine (Embedded embedded)
{
super();
setDebug (embedded.getDebug());
setLogger(embedded.getLogger());
setRealm (embedded.getRealm());
}
public synchronized void start() throws LifecycleException
{
// Validate and update our current component state
if (started)
throw new LifecycleException
(sm.getString("containerBase.alreadyStarted", logName()));
addDefaultMapper ("org.apache.catalina.core.StandardEngineMapper");
started = true;
// Start our subordinate components, if any
if ((loader != null) && (loader instanceof Lifecycle))
((Lifecycle) loader).start();
if ((logger != null) && (logger instanceof Lifecycle))
((Lifecycle) logger).start();
if ((manager != null) && (manager instanceof Lifecycle))
((Lifecycle) manager).start();
if ((cluster != null) && (cluster instanceof Lifecycle))
((Lifecycle) cluster).start();
if ((realm != null) && (realm instanceof Lifecycle))
((Lifecycle) realm).start();
if ((resources != null) && (resources instanceof Lifecycle))
((Lifecycle) resources).start();
// Start our Mappers, if any
Mapper mappers[] = findMappers();
for (int i = 0; i < mappers.length; i++) {
if (mappers[i] instanceof Lifecycle)
((Lifecycle) mappers[i]).start();
}
// Start our child containers, if any
Container children[] = findChildren();
for (int i = 0; i < children.length; i++) {
if (children[i] instanceof Lifecycle)
((Lifecycle) children[i]).start();
}
// Start the Valves in our pipeline (including the basic), if any
if (pipeline instanceof Lifecycle)
((Lifecycle) pipeline).start();
// Notify our interested LifecycleListeners
lifecycle.fireLifecycleEvent(START_EVENT, null);
}
}
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>