Archive for February, 2009

Chapter 4: Tomcat Architecture The lifecycleEvent()method takes a

Saturday, February 7th, 2009

Chapter 4: Tomcat Architecture The lifecycleEvent()method takes a LifecycleEventobject, which is a wrapper for the event to contain the event type as well as additional payload data that may be associated with the event. For example, let s say you want to receive an e-mail every time the Host starts or shuts down. You can write a listener similar to the following: public MyListener implements LifecycleListener { public void lifecycleEvent(LifecycleEvent event){ if (Lifecycle.START_EVENT.equals(event.getType())){ //Code here to email that a Start Event was received } if (Lifecycle.STOP_EVENT.equals(event.getType())){ //Code here to email that a Stop Event was received } } } The payload data could be used if you were to write your own events that are a part of your own components (engine, host, or context) and fire specialized events of your own. As you can see, the plug-ability of the Tomcat container is extremely powerful as any components that work with the lifecycle interfaces can become an integrated part of the Tomcat infrastructure immediately. Configuration by Architecture Throughout this chapter, you have seen the different components of the Tomcat architecture and the parent-child relationships that they build upon each other. If you understand these relationships, configuring Tomcat is much easier. The most important and critical configuration file in Tomcat is /conf/service.xml. When Tomcat starts, it uses a version of the Apache Commons Digester to read the service.xmlfile. The Digester is a utility that reads XML files and creates Java objects from a set of rules. Thus, it reads service.xml and creates the Tomcat components and sets properties based upon what is in this file, as shown in the sample listing:

If you looking for unlimited one inclusive web hosting plan please check web hosting plan website.

Chapter 4: Tomcat Architecture starting/stopping, and all of

Friday, February 6th, 2009

Chapter 4: Tomcat Architecture webapp implements the WARP

Thursday, February 5th, 2009

Chapter 4: Tomcat Architecture Web server on its

Thursday, February 5th, 2009

Chapter 4: Tomcat Architecture AJP13 uses a binary

Wednesday, February 4th, 2009

Chapter 4: Tomcat Architecture Web browser TOMCAT WEB

Tuesday, February 3rd, 2009

Chapter 4: Tomcat Architecture If APR is not

Tuesday, February 3rd, 2009

Chapter 4: Tomcat Architecture The Context may also

Monday, February 2nd, 2009

Chapter 4: Tomcat Architecture host name requested, and

Sunday, February 1st, 2009

Chapter 4: Tomcat Architecture In practice, the container

Sunday, February 1st, 2009