Hi Yoav,

        I have tried <Context path="" ... /> and this still causes my web
application to be deployed twice.

I have checked the documentation for Tomcat 4.1 and it appears to be
autoDeploy that is used which I have set to false.

Is this a bug or am I just being a bit thick (which is most likely @;) !!)

Would upgrading to a newer version of Tomcat resolve this?

just to recap,

I will only ever run one web application on tomcat and all I need is for the
user just to type in the URL http://<myip>/ to user the mygui web
application, however I am getting two instances of mygui loaded.

Thanks

Pete

-----Original Message-----
From: Shapira, Yoav [mailto:[EMAIL PROTECTED]
Sent: 13 September 2004 17:05
To: Tomcat Users List
Subject: RE: Help setting up a default web application



Hi,
Context path="/" is a no-no.  Use path="" for the "default" web
application, and path="/something" for others, but not "/" by itself.

The name(s) of the relevant Host attribute(s) you need to turn off in
order to disable automatic web application deployment might be different
depending on your Tomcat version.  There's autoDeploy, liveDeploy, and
deployOnStartup, for example.  Check the configuration reference
documentation for the Host element for your specific Tomcat version.

Yoav Shapira
Millennium Research Informatics


>-----Original Message-----
>From: Pete [mailto:[EMAIL PROTECTED]
>Sent: Monday, September 13, 2004 12:05 PM
>To: Tomcat Users List
>Subject: RE: Help setting up a default web application
>
>Hi Ben,
>
>        Thanks for your help, unfortunatly that still has not solved my
>problem. Below is the content of my server.xml file:
>
><Server port="8005" shutdown="SHUTDOWN" debug="0">
>        <Listener
>className="org.apache.catalina.mbeans.ServerLifecycleListener"
debug="0" />
>        <Listener
>className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener"
>debug="0" />
>        <!--  Global JNDI resources -->
>        <GlobalNamingResources>
>                <!--  Test entry for demonstration purposes  -->
>                <Environment name="simpleValue"
type="java.lang.Integer"
>value="30" />
>                <!-- Editable user database that can also be used by
>UserDatabaseRealm to authenticate users -->
>                <Resource name="UserDatabase" auth="Container"
>type="org.apache.catalina.UserDatabase" description="User database that
can
>be updated and saved" />
>                <ResourceParams name="UserDatabase">
>                        <parameter>
>                                <name>factory</name>
>
><value>org.apache.catalina.users.MemoryUserDatabaseFactory</value>
>                        </parameter>
>                        <parameter>
>                                <name>pathname</name>
>                                <value>conf/tomcat-users.xml</value>
>                        </parameter>
>                </ResourceParams>
>        </GlobalNamingResources>
>        <!--
>        A "Service" is a collection of one or more "Connectors" that
share
>        a single "Container" (and therefore the web applications
visible
>        within that Container).  Normally, that Container is an
"Engine",
>        but this is not required.
>
>        Note:  A "Service" is not itself a "Container", so you may not
>        define subcomponents such as "Valves" or "Loggers" at this
>level. -->
>        <!--  Define the Tomcat Stand-Alone Service -->
>        <Service name="Tomcat-Standalone">
>                <!--  Define a non-SSL Coyote HTTP/1.1 Connector on
port
>8080 -->
>                <Connector
>className="org.apache.coyote.tomcat4.CoyoteConnector" port="80"
>minProcessors="5" maxProcessors="75" enableLookups="true"
>redirectPort="8443" acceptCount="100" debug="0"
connectionTimeout="20000"
>useURIValidationHack="false" disableUploadTimeout="true" />
>                <!-- Note : To disable connection timeouts, set
>connectionTimeout value to -1 -->
>
>                <!--  Define a Coyote/JK2 AJP 1.3 Connector on port
8009 --
>>
>                <Connector
>className="org.apache.coyote.tomcat4.CoyoteConnector" port="8009"
>minProcessors="5" maxProcessors="75" enableLookups="true"
>redirectPort="8443" acceptCount="10" debug="0" connectionTimeout="0"
>useURIValidationHack="false"
>protocolHandlerClassName="org.apache.jk.server.JkCoyoteHandler" />
>                <!--
>                An Engine represents the entry point (within Catalina)
that
>processes
>                every request.  The Engine implementation for Tomcat
stand
>alone
>                analyzes the HTTP headers included with the request,
and
>passes them
>                on to the appropriate Host (virtual host). -->
>
>                <!--  Define the top level container in our container
>hierarchy -->
>                <Engine name="Standalone" defaultHost="localhost"
>debug="0">
>                        <!--
>                        The request dumper valve dumps useful debugging
>information about
>                        the request headers and cookies that were
received,
>and the response
>                        headers and cookies that were sent, for all
>requests
>received by
>                        this instance of Tomcat.  If you care only
about
>requests to a
>                        particular virtual host, or a particular
>application, nest this
>                        element inside the corresponding <Host> or
><Context>
>entry instead.
>
>                        For a similar mechanism that is portable to all
>Servlet 2.3
>                        containers, check out the "RequestDumperFilter"
>Filter in the
>                        example application (the source for this filter
may
>be found in
>
>"$CATALINA_HOME/webapps/examples/WEB-INF/classes/filters").
>
>                        Request dumping is disabled by default.
Uncomment
>the following
>                        element to enable it. -->
>                        <!--  Global logger unless overridden at lower
>levels -->
>                        <Logger
>className="org.apache.catalina.logger.FileLogger"
prefix="catalina_log."
>suffix=".txt" timestamp="true" />
>                        <!--  Because this Realm is here, an instance
will
>be shared globally -->
>                        <!-- This Realm uses the UserDatabase
configured in
>the global JNDI
>                        resources under the key "UserDatabase".  Any
edits
>                        that are performed against this UserDatabase
are
>immediately
>                        available for use by the Realm.  -->
>                        <Realm
>className="org.apache.catalina.realm.UserDatabaseRealm" debug="0"
>resourceName="UserDatabase" />
>                        <!--  Define the default virtual host -->
>                        <Host name="localhost" debug="0"
appBase="webapps"
>unpackWARs="true" autoDeploy="false">
>                                <!-- <Context path="" docBase="mygui"
>debug="0" reloadable="false" crossContext="false" /> -->
>                                <Context path="/" docBase="mygui"
debug="0"
>reloadable="false" crossContext="false" />
>                        </Host>
>                </Engine>
>        </Service>
></Server>
>
>The version of tomcat that I am using is 4.1.27.
>
>the trace from the catalina.out is as follows:
>
>[INFO] Registry - -Loading registry information
>[INFO] Registry - -Creating new Registry instance
>[INFO] Registry - -Creating MBeanServer
>[INFO] Http11Protocol - -Initializing Coyote HTTP/1.1 on port 80
>Starting service Tomcat-Standalone
>Apache Tomcat/4.1.27
>Initialising static classes ...
>Using XML Parser - Xerces-J 2.4.0
>Using XML Parser - Xerces-J 2.4.0
>Using XML Parser - Xerces-J 2.4.0
>time taken to parse configuration file - 511ms
>[INFO] Http11Protocol - -Starting Coyote HTTP/1.1 on port 80
>[INFO] ChannelSocket - -JK2: ajp13 listening on 0.0.0.0/0.0.0.0:8009
>[INFO] JkMain - -Jk running ID=0 time=1/31
>config=/export/home/jakarta-tomcat-4.1.27/conf/jk2.properties
>[INFO] PropertyMessageResources - -Initializing,
>config='org.apache.struts.util.LocalStrings', returnNull=true
>[INFO] PropertyMessageResources - -Initializing,
>config='org.apache.struts.action.ActionResources', returnNull=true
>[INFO] PropertyMessageResources - -Initializing,
>config='org.apache.webapp.admin.ApplicationResources', returnNull=true
>Initialising static classes ...  <---- Here is the problem the listener
is
>loaded instanciated again loaded again!!!!!
>Using XML Parser - Xerces-J 2.4.0
>Using XML Parser - Xerces-J 2.4.0
>Thanks again for your help
>
>Basically i use my listener to load create a server socket for one of
our
>apps to connect to.
>
>Thanks again for your help
>
>Pete
>
>
>-----Original Message-----
>From: Ben Souther [mailto:[EMAIL PROTECTED]
>Sent: 13 September 2004 16:33
>To: Tomcat Users List
>Subject: RE: Help setting up a default web application
>
>
>In your <Host ... node, do you have autoDeploy set to false?
>
>In your <Context.. node do you have path set to "/"?
>
>
>
>
>
>On Mon, 2004-09-13 at 11:04, Pete wrote:
>> Hi There,
>>
>>       Tomcat now delays loading the second instance of the web
>application
>until
>> type in the URL.
>>
>> Is there anything else I am missing ?
>>
>> The problem I have is that I create a server socket in my
application,
>the
>> second instance causes a problem because I get a Bind Exception.
>>
>> Thanks
>>
>> Pete
>>
>> -----Original Message-----
>> From: Ben Souther [mailto:[EMAIL PROTECTED]
>> Sent: 13 September 2004 15:52
>> To: Tomcat Users List
>> Subject: Re: Help setting up a default web application
>>
>>
>> If you're manually configuring server.xml, shut off autodeploy in the
>> Host node.
>>
>>
>> On Mon, 2004-09-13 at 10:50, Pete wrote:
>> > Hi All,
>> >
>> >     I was hoping that someone would be able to explain that when I
set
>a
>> > Context in the server.xml:
>> >
>> > <Context path="" docBase="mygui" debug="0" reloadable="false"
>> > crossContext="false"/>
>> >
>> > that tomcat appears to load mygui two instances of mygui.
>> >
>> > Basically all I need is that when a user type in the ip address of
the
>box
>> > running tomcat, tomcat points the user directly to mygui and
displays
>my
>> > custom welcome page.
>> >
>> > Is this a dodgy configuration on my part and if so how do I resolve
>this.
>> >
>> > Any help would be greatly appreciated.
>> >
>> > Thanks
>> >
>> > Pete
>> >
>> >
>> >
>> >
>> >
>> >
---------------------------------------------------------------------
>> > To unsubscribe, e-mail: [EMAIL PROTECTED]
>> > For additional commands, e-mail:
[EMAIL PROTECTED]
>> >
>> >
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]




This e-mail, including any attachments, is a confidential business
communication, and may contain information that is confidential, proprietary
and/or privileged.  This e-mail is intended only for the individual(s) to
whom it is addressed, and may not be saved, copied, printed, disclosed or
used by anyone else.  If you are not the(an) intended recipient, please
immediately delete this e-mail from your computer system and notify the
sender.  Thank you.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to