You should not need both
http://tomcat.apache.org/tomcat-5.5-doc/config/context.html

The definition of path
path = The context path of this web application, which is matched against the beginning of each request URI to select the appropriate web application for processing. All of the context paths within a particular Host must be unique. If you specify a context path of an empty string (""), you are defining the default web application for this Host, which will process all requests not assigned to other Contexts. The value of this field must NOT be set except when statically defining a Context in server.xml, as it will be inferred from the filenames used for either the .xml context file or the docBase.

The definition of docBase
docBase = The Document Base (also known as the Context Root) directory for this web application, or the pathname to the web application archive file (if this web application is being executed directly from the WAR file). You may specify an absolute pathname for this directory or WAR file, or a pathname that is relative to the appBase directory of the owning Host. If a symbolic link is used for docBase then changes to the symbolic link will only be effective after a Tomcat restart or by undeploying and redeploying the conext. A context reload is not sufficient.

Do not choose a docBase that starts with your Host's appBase string. The default appBase is "webapps" so do not choose a docBase like "webapps-foo." Doing so will lead to deployment errors: see Bugzilla for details.

HTH
martin

This email message and any files transmitted with it contain confidential
information intended only for the person(s) to whom this email message is
addressed.  If you have received this email message in error, please notify
the sender immediately by telephone or email and destroy the original
message without making a copy.  Thank you.

----- Original Message ----- From: "sc" <[EMAIL PROTECTED]>
To: <users@tomcat.apache.org>
Sent: Sunday, April 29, 2007 10:41 AM
Subject: Re: Context started twice



I removed /path. Still the same problem. The version I am using is 5.5.17 and
it is win xp.


Pid-2 wrote:

sc wrote:
There was a thread on this
"http://www.nabble.com/Context-starts-twice-t1351694.html";. But my
configuration is a bit different.

this is my configuration:

server.xml doesn't have context definition.
context.xml is empty except this line
<WatchedResource>WEB-INF/web.xml</WatchedResource>

under $CATALINA_HOME/Catalina/localhost, I defined a context xml file,
trip.xml

<?xml version='1.0' encoding='utf-8'?>
<Context docBase="d:/dev/trip/main/build" path="/trip">
    <Resource name="jdbc/trip" auth="Container"
..........
</Context>


Note: path attribute should not be set unless context is defined in
server.xml, which is *strongly* discouraged.

  <?xml version='1.0' encoding='utf-8'?>
  <Context docBase="d:/dev/trip/main/build">
      <Resource name="jdbc/trip" auth="Container"
  ..........
  </Context>

Won't fix your problem tho.
Which version of Tomcat, OS? etc


p



In my web.xml, I have the following entry,

    <servlet>
        <servlet-name>dummy</servlet-name>
        <servlet-class>com.trip.view.DummyServlet</servlet-class>
         <load-on-startup>1</load-on-startup>
    </servlet>

When DummyServlet starts, it init twice. Any help is appreciated.





--
View this message in context: http://www.nabble.com/Context-started-twice-tf3664516.html#a10242348
Sent from the Tomcat - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to