tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Larry Isaacs <>
Subject RE: Singleton in Tomcat 6.0 not working
Date Thu, 05 Jun 2008 19:32:29 GMT
I think the Tomcat support in Eclipse WTP is pretty reasonable, but it isn't perfect.  For
example, if you name your project ROOT, Eclipse won't tell you that you are asking for trouble
because some web servers, like Tomcat, may give that particular name special treatment.  This
would explain the:

<Context docBase="ROOT" path="/ROOT" reloadable="true" source="org.eclipse.jst.jee.server:ROOT"/>

Thus, I would recommend not naming a Dynamic Web Project "ROOT".  You can make a Dynamic Web
Project the default webapp by opening the Web Project Setting page of the project's Properties
dialog and set the Context Root field to a blank string.  When published to a Tomcat server
in Eclipse, it will become the default (i.e. ROOT) webapp.

Because putting Contexts in server.xml is supported by all versions of Tomcat, this is the
default behavior.  For Tomcat 5.x and later, you can enable the "Publish module contexts to
separate XML files" option in the server editor.  This will remove the Contexts from the server.xml
(the one found under the Servers project in your workspace) and write the Contexts to separate
files when publishing the server.  Obviously, this implies the server.xml you find under the
Servers project in your workspace is not the one used by Tomcat when it is running.  Tomcat
runs off a modified copy created when the server is published.

See for more details about the Tomcat support in Eclipse.


> -----Original Message-----
> From: ktou Ho []
> Sent: Thursday, June 05, 2008 2:24 PM
> To: Tomcat Users List
> Subject: RE: Singleton in Tomcat 6.0 not working
> By the way, I was using the Eclipse 3.3, it integrated the Tomcat
> development tool. It was the Eclipse add that line to the server.xml.
> May be we need to let them know about this.
> Thanks
> Elwin> From:> To:>
> Date: Thu, 5 Jun 2008 13:15:03 -0500> Subject: RE: Singleton in Tomcat
> 6.0 not working> > > From: ktou Ho []> >
> Subject: RE: Singleton in Tomcat 6.0 not working> >> > Did you mean I
> should just remove this <Context> element> > from the server.xml?> >
> You should never have put it in there, so definitely remove it. If you
> need to set the reloadable attribute, then put just this:> > <Context
> reloadable="true"/>> > in the file META-INF/context.xml inside the
> webapp. Note that setting reloadable incurs some additional overhead
> inside Tomcat, so it is normally not used for production.> > The doc
> reference:>
> doc/config/context.html> > - Chuck> > > THIS COMMUNICATION MAY CONTAIN
> only by the intended recipient. If you received this in error, please
> contact the sender and delete the e-mail and its attachments from all
> computers.> > ---------------------------------------------------------
> ------------> To start a new topic, e-mail:> To
> unsubscribe, e-mail:> For
> additional commands, e-mail:>
> _________________________________________________________________
> Instantly invite friends from Facebook and other social networks to
> join you on Windows Live(tm) Messenger.

To start a new topic, e-mail:
To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message