RE: Help setting up a default web application
Hi Yoav, Thanks for replying, I do shutdown Tomcat, the I check to see if the JVM is running via: ps -eaf | grep -i java Then when I restart tomcat everything appears to be fine. I then get the bind exception when I attempt to access the web application, since tomcat appears to re-load the webapp in another class loader. Is there any debug flags that I can use in order to try and track down this problem ? Thanks Pete -Original Message- From: Shapira, Yoav [mailto:[EMAIL PROTECTED] Sent: 13 September 2004 17:20 To: Tomcat Users List Subject: RE: Help setting up a default web application Hi, I doubt it's a bug in Tomcat. This worked well for me for a long time in Tomcat 4.1 and still works well in 5.x, although as I mentioned the Host attribute names changed between 4.1 and 5.x. Are you sure you're getting a clean startup and shutdown? I saw earlier in this thread you were receiving some bind exceptions. Could it be you haven't really seen the effect of autoDeploy=false because you haven't done a clean and complete restart of the server since you changed server.xml? Make sure the JVM process is dead after you stop Tomcat, and that you don't get a bind exception (or any other exceptions) when you start up. Yoav Shapira Millennium Research Informatics -Original Message- From: Pete [mailto:[EMAIL PROTECTED] Sent: Monday, September 13, 2004 12:19 PM To: Tomcat Users List Subject: RE: Help setting up a default web application 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 namefactory/name valueorg.apache.catalina.users.MemoryUserDatabaseFactory/value /parameter parameter namepathname/name valueconf/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
RE: Help setting up a default web application
Hi, I then get the bind exception when I attempt to access the web application, since tomcat appears to re-load the webapp in another class loader. There's one I've never heard before ;) That's something I like about this list, always something new. Tomcat wouldn't reload (or stop, or start, or deploy, or undeploy, or any of those management operations) any of your webapps unless you explicitly ask it to by using the Manager webapp. Is there any debug flags that I can use in order to try and track down this problem ? Sure. There are debug attributes on all the containers in server.xml (Server, Service, Engine, Host, Connector, etc.) that you can set to 99 to have increased debug logging output (to the console or the localhost_log, depending on your configuration). Furthermore, depending on your tomcat version some parts of tomcat may be using commons-logging, so you can configure Tomcat to log more by using commons-logging implementation (e.g. log4j or JDK 1.4 logging) and a corresponding configuration file. Yoav 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]
RE: Help setting up a default web application
:162) at com.circ.configuration.GUIConfiguration.guiCfgParser.clinit(guiCfgParser.j ava:133) at com.circ.audit.auditor.clinit(auditor.java:30) at com.circ.listener.sessionMonitor.init(sessionMonitor.java:35) at com.circ.listener.sessionMonitor.Instance(sessionMonitor.java:44) at com.circ.listener.listener.init(listener.java:49) at java.lang.Class.newInstance0(Native Method) at java.lang.Class.newInstance(Class.java:232) at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java: 3238) at org.apache.catalina.core.StandardContext.start(StandardContext.java:3599) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:8 21) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:807) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:579) at org.apache.catalina.core.StandardHostDeployer.install(StandardHostDeployer.j ava:307) at org.apache.catalina.core.StandardHost.install(StandardHost.java:772) at org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:492) at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:400) at org.apache.catalina.startup.HostConfig.run(HostConfig.java:851) at java.lang.Thread.run(Thread.java:479) 2004-09-14 13:31:22 StandardContext[/mygui]: Skipped installing application listeners due to previous error(s) 2004-09-14 13:31:22 StandardContext[/mygui]: Context startup failed due to previous errors 2004-09-14 13:31:22 HostConfig[localhost]: Deploying web application directory webdav 2004-09-14 13:31:22 StandardHost[localhost]: Installing web application at context path /webdav from URL file:/export/home/jakarta-tomcat-4.1.27/webapps/webdav 2004-09-14 13:31:22 WebappLoader[/webdav]: Deploying class repositories to work directory /export/home/jakarta-tomcat-4.1.27/work/Standalone/localhost/webdav 2004-09-14 13:31:22 StandardManager[/webdav]: Seeding random number generator class java.security.SecureRandom 2004-09-14 13:31:22 StandardManager[/webdav]: Seeding of random number generator has been completed 2004-09-14 13:31:22 StandardWrapper[/webdav:default]: Loading container servlet default 2004-09-14 13:31:22 StandardWrapper[/webdav:invoker]: Loading container servlet invoker Thanks again for you time and help, Pete -Original Message- From: Shapira, Yoav [mailto:[EMAIL PROTECTED] Sent: 14 September 2004 13:54 To: Tomcat Users List Subject: RE: Help setting up a default web application Hi, I then get the bind exception when I attempt to access the web application, since tomcat appears to re-load the webapp in another class loader. There's one I've never heard before ;) That's something I like about this list, always something new. Tomcat wouldn't reload (or stop, or start, or deploy, or undeploy, or any of those management operations) any of your webapps unless you explicitly ask it to by using the Manager webapp. Is there any debug flags that I can use in order to try and track down this problem ? Sure. There are debug attributes on all the containers in server.xml (Server, Service, Engine, Host, Connector, etc.) that you can set to 99 to have increased debug logging output (to the console or the localhost_log, depending on your configuration). Furthermore, depending on your tomcat version some parts of tomcat may be using commons-logging, so you can configure Tomcat to log more by using commons-logging implementation (e.g. log4j or JDK 1.4 logging) and a corresponding configuration file. Yoav 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]
Help setting up a default web application
Hi Yoav, I was just wondering what is the preferred method for using singleton classes. Would it be better if I made them available to all context's (by putting them in a jar file in the shared/lib directory) and thus avoid the errors that I have been seeing (this would require a bit of redesign on my part!! ;) )? Thanks again for your help. Cheers Pete - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Help setting up a default web application
Hi, There's no preferred way to use a singleton: like all other design patterns, it depends on your requirements. The difference between putting the singleton class in the shared or common directory and putting it in the WEB-INF/lib directory of each webapp is very significant. There is one instance of a singleton per classloaders. Each webapp has its own classloader, so if you put singleton.class in the WEB-INF/classes directory of each webapp, you will have one instance of the singleton class per webapp: this might be good or bad depending on your design. If you put singleton.class in common/classes or shared/classes, there will be one instance of this class for all your webapps, i.e. this instance can be used to share date. This is much closer to the command-line or traditional interpretation of the singleton pattern (which newbies confuse for one instance in the JVM, not being aware of classloader intricacies). Yoav Shapira Millennium Research Informatics -Original Message- From: Pete [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 14, 2004 11:24 AM To: Tomcat Users List Subject: Help setting up a default web application Hi Yoav, I was just wondering what is the preferred method for using singleton classes. Would it be better if I made them available to all context's (by putting them in a jar file in the shared/lib directory) and thus avoid the errors that I have been seeing (this would require a bit of redesign on my part!! ;) )? Thanks again for your help. Cheers Pete - 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]
RE: Help setting up a default web application
Hi, Tomcat would deploy a webapp twice if it's explicitly declared (e.g. via Context tag in server.xml) and also automatic application deployment is turned on (e.g. by setting autoDeploy=true for the relevant Host in server.xml). Since automatic application deployment is enabled by default, this is a fairly common configuration error. As for starting a ServerSocket from within a Servlet Container (or any J2EE container) -- I don't have the time nor the motivation to deal with that use-case ;) Maybe others do. Yoav Shapira Millennium Research Informatics -Original Message- From: Pete [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 14, 2004 9:14 AM To: Tomcat Users List Subject: RE: Help setting up a default web application Hi Yoav, I basically use a listener to start a series of singleton classes, one of which is a Server Socket and another is class that performs some native calls, the second time the listener is loaded then I get the UnsatisifiedLinkError, (which I can resolve by placing the jar file for this in the shared/lib directory and hence the Bind Exception occurs after I resolve this issue). From looking at the below trace it appears that tomcat is deploying mygui twice. (I am sure I am wrong but hey it was worth a shot!! ;) !!) I am wondering if this is purely configuration or am I doing somthing that Tomcat was never intended to do? 2004-09-14 13:31:03 StandardContext[]: Starting 2004-09-14 13:31:03 StandardContext[]: Processing start(), current available=false 2004-09-14 13:31:03 StandardContext[]: Configuring default Resources 2004-09-14 13:31:03 StandardContext[]: Configuring non-privileged default Loader 2004-09-14 13:31:03 StandardContext[]: Configuring default Manager 2004-09-14 13:31:03 StandardContext[]: Processing standard container startup 2004-09-14 13:31:03 WebappLoader[]: Deploying class repositories to work directory /export/home/jakarta-tomcat-4.1.27/work/Standalone/localhost/_ 2004-09-14 13:31:03 WebappLoader[]: Deploy class files /WEB-INF/classes to /export/home/jakarta-tomcat-4.1.27/webapps/mygui/WEB-INF/classes 2004-09-14 13:31:03 WebappLoader[]: Deploy JAR /WEB-INF/lib/commons-fileupload-1.0.jar to /export/home/jakarta-tomcat-4.1.27/webapps/mygui/WEB-INF/lib/common s-fileupload-1.0.jar 2004-09-14 13:31:03 ContextConfig[]: ContextConfig: Processing START 2004-09-14 13:31:03 StandardContext[]: Setting deployment descriptor public ID to '-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN' 2004-09-14 13:31:03 StandardContext[]: Setting deployment descriptor public ID to '-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN' 2004-09-14 13:31:04 ContextConfig[]: Accumulating TLD resource paths 2004-09-14 13:31:04 ContextConfig[]: Scanning taglib elements in web.xml 2004-09-14 13:31:04 ContextConfig[]: Scanning TLDs in /WEB-INF subdirectory 2004-09-14 13:31:04 ContextConfig[]: Scanning JARs in /WEB-INF/lib subdirectory 2004-09-14 13:31:04 ContextConfig[]:Adding path '/WEB-INF/lib/commons-fileupload-1.0.jar' 2004-09-14 13:31:04 ContextConfig[]: Scanning JAR at resource path '/WEB-INF/lib/commons-fileupload-1.0.jar' 2004-09-14 13:31:04 ContextConfig[]: Pipline Configuration: 2004-09-14 13:31:04 ContextConfig[]: org.apache.catalina.core.StandardContextValve/1.0 2004-09-14 13:31:04 ContextConfig[]: == 2004-09-14 13:31:04 NamingContextListener[/Standalone/localhost]: Creating JNDI naming context 2004-09-14 13:31:04 NamingContextListener[/Standalone/localhost]: Resource parameters for UserTransaction = null 2004-09-14 13:31:04 StandardManager[]: Seeding random number generator class java.security.SecureRandom 2004-09-14 13:31:04 StandardManager[]: Seeding of random number generator has been completed 2004-09-14 13:31:04 StandardContext[]: Posting standard context attributes 2004-09-14 13:31:04 StandardContext[]: Configuring application event listeners 2004-09-14 13:31:04 StandardContext[]: Configuring event listener class 'com.circ.listener.listener' 2004-09-14 13:31:04 StandardContext[]: Sending application start events 2004-09-14 13:31:04 StandardContext[]: Starting filters 2004-09-14 13:31:04 StandardWrapper[:default]: Loading container servlet default 2004-09-14 13:31:05 StandardWrapper[:invoker]: Loading container servlet invoker 2004-09-14 13:31:05 StandardContext[]: Starting completed 2004-09-14 13:31:05 HostConfig[localhost]: HostConfig: Processing START 2004-09-14 13:31:05 HostConfig[localhost]: Starting background thread 2004-09-14 13:31:05 HostConfig[localhost]: BACKGROUND THREAD Starting 2004-09-14 13:31:20 HostConfig[localhost]: Deploying discovered web applications 2004-09-14 13:31:03 StandardContext[]: Starting 2004-09-14 13:31:03 StandardContext[]: Processing start(), current available=false 2004-09-14 13:31:03 StandardContext[]: Configuring default Resources 2004-09-14 13:31:03 StandardContext[]: Configuring non-privileged default Loader 2004-09-14 13:31:03 StandardContext[]: Configuring default
Help setting up a default web application
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]
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]
RE: Help setting up a default web application
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]
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]
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 namefactory/name valueorg.apache.catalina.users.MemoryUserDatabaseFactory/value /parameter parameter namepathname/name valueconf/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=2 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
RE: Help setting up a default web application
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 namefactory/name valueorg.apache.catalina.users.MemoryUserDatabaseFactory/value /parameter parameter namepathname/name valueconf/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=2 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
RE: Help setting up a default web application
Hi, I doubt it's a bug in Tomcat. This worked well for me for a long time in Tomcat 4.1 and still works well in 5.x, although as I mentioned the Host attribute names changed between 4.1 and 5.x. Are you sure you're getting a clean startup and shutdown? I saw earlier in this thread you were receiving some bind exceptions. Could it be you haven't really seen the effect of autoDeploy=false because you haven't done a clean and complete restart of the server since you changed server.xml? Make sure the JVM process is dead after you stop Tomcat, and that you don't get a bind exception (or any other exceptions) when you start up. Yoav Shapira Millennium Research Informatics -Original Message- From: Pete [mailto:[EMAIL PROTECTED] Sent: Monday, September 13, 2004 12:19 PM To: Tomcat Users List Subject: RE: Help setting up a default web application 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 namefactory/name valueorg.apache.catalina.users.MemoryUserDatabaseFactory/value /parameter parameter namepathname/name valueconf/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=2 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