RE: Tomcat deployment question
Hey, Chuck, Take it easy man. How can I know which documentation is up-to-date and which one is not? They says confusing things, if i read manager doc it works against context/host documentation. Anyway, thanks for the help. My last question: if i upload in ROOT.war manager will it work as the default application in / path? Andras Caldarale, Charles R wrote: I wonder how many times we have to repeat this: THE PATH ATTRIBUTE IS IRRELEVANT UNLESS THE Context ELEMENT IS IN conf/server.xml. To quote from the Context doc for the path attribute: 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. Yes, the doc for the manager app needs some work. - Chuck -- View this message in context: http://www.nabble.com/Tomcat-deployment-question-tf3604620.html#a10334312 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]
RE: Tomcat deployment question
From: Andras Laczi [mailto:[EMAIL PROTECTED] Subject: RE: Tomcat deployment question Take it easy man. Sorry. The topic of setting the path attribute in a Context element is discussed frequently on this list, including a couple of times on the very day you posted, as well as previously in this thread. It's frustrating when people keep ignoring the discussion. How can I know which documentation is up-to-date and which one is not? By reading the related discussions on the mailing list. Generally, you can expect the Tomcat core doc to be more accurate than the ancilliary pieces, but even the core occasionally lags behind reality. My last question: if i upload in ROOT.war manager will it work as the default application in / path? If I read your question correctly (using manager to deploy ROOT.war), yes, that will work. Make sure that the webapps/ROOT directory is removed first. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use 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: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat deployment question
Andras Laczi wrote: I dont really understand why manager can't rename the context.xml to ROOT.xml if the path = / as the documentation says. Where does the documentation say this? Mark - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat deployment question
Andras Laczi wrote: How can I know which documentation is up-to-date and which one is not? They says confusing things, if i read manager doc it works against context/host documentation. They should be consistent and I thought they were last time I checked. Please point out the inconsistencies so they can be fixed. Mark - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tomcat deployment question
From: Mark Thomas [mailto:[EMAIL PROTECTED] Subject: Re: Tomcat deployment question Andras Laczi wrote: I dont really understand why manager can't rename the context.xml to ROOT.xml if the path = / as the documentation says. Where does the documentation say this? The section: http://tomcat.apache.org/tomcat-5.5-doc/manager-howto.html#Supported%20M anager%20Commands contains this bulleted item: * path - The context path (including the leading slash) of the web application you are dealing with. To select the ROOT web application, specify /. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use 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: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat deployment question
Caldarale, Charles R wrote: From: Mark Thomas [mailto:[EMAIL PROTECTED] Subject: Re: Tomcat deployment question Andras Laczi wrote: I dont really understand why manager can't rename the context.xml to ROOT.xml if the path = / as the documentation says. Where does the documentation say this? The section: http://tomcat.apache.org/tomcat-5.5-doc/manager-howto.html#Supported%20M anager%20Commands contains this bulleted item: * path - The context path (including the leading slash) of the web application you are dealing with. To select the ROOT web application, specify /. Found it. One re-write coming up. Mark - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tomcat deployment question
If someone succeed to deploy an web application trough manager on 5.5.23 tomcat which path is / (root ) and the web application directory is not ROOT please let me know. It's making me crazy, i migrating from 5.0.16 with working configuration and on 5.5.23 same conf works a completely different ways. Andras Lakshmi Venkataraman wrote: Please refer to the directory structure in the original message or At the bottom of this email. Given that directory structure, I have working configuration with appBase=webapps in server.xml (seems like a dummy value since we don't have anything in that directory). In ${catalina.home}/conf/catalina/localhost/ROOT.xml I have defined the Context element with docBase=${catalina.home}/htdocs. Here are the questions: Previously, I had appBase=htdocs and ROOT.xml was called htdocs.xml. 1) When absolute path such as ${catalina.home}/htdocs is specified why does it look for ${catalina.home}/htdocs/htdocs/ 2) Why does it expect a ROOT directory under htdocs? 3) What is special about ROOT? Should not the configuration be totally under application Developer's control? 4) What is path? It is not very clear from the documenatation. It took me a while to get to the current working Configuration. I will appreciate it if one of you can clarify these concepts. Thanks in advance, Lakshmi -- View this message in context: http://www.nabble.com/Tomcat-deployment-question-tf3604620.html#a10320799 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]
Re: Tomcat deployment question
Andras Laczi wrote: If someone succeed to deploy an web application trough manager on 5.5.23 tomcat which path is / (root ) and the web application directory is not ROOT please let me know. It's making me crazy, i migrating from 5.0.16 with working configuration and on 5.5.23 same conf works a completely different ways. Andras The closest you'll get to the 5.0.x behaviour is anything.war located outside the host's appBase and a ROOT.xml pointing towards it. Mark - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat deployment question
Thats bad cause I need to upload newer releases very often, and trough manager was the fastest way to do this. I must rethink the way of development-deployment. I dont really understand why manager can't rename the context.xml to ROOT.xml if the path = / as the documentation says. Andras Mark Thomas-15 wrote: The closest you'll get to the 5.0.x behaviour is anything.war located outside the host's appBase and a ROOT.xml pointing towards it. Mark -- View this message in context: http://www.nabble.com/Tomcat-deployment-question-tf3604620.html#a10323351 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]
RE: Tomcat deployment question
From: Andras Laczi [mailto:[EMAIL PROTECTED] Subject: Re: Tomcat deployment question I dont really understand why manager can't rename the context.xml to ROOT.xml if the path = / as the documentation says. I wonder how many times we have to repeat this: THE PATH ATTRIBUTE IS IRRELEVANT UNLESS THE Context ELEMENT IS IN conf/server.xml. To quote from the Context doc for the path attribute: 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. Yes, the doc for the manager app needs some work. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use 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: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat deployment question
Hi Lakshmi, I just wanted to let you know that in the most recent post on this thread, your problem was solved (even though I didn't give a complete answer) but after my post Chuck made some very good points which I didn't mention in my post. I hope you took a note of them. Especially this one: Remove the existing webapps/ROOT to avoid conflict. On 5/4/07, Lakshmi Venkataraman [EMAIL PROTECTED] wrote: P.s: The documentation is not very clear on these points. I hope some expert out there will update Tomcat FAQ. In most software development the docs take a little while, but in terms of functionality much has been achieved in the recent versions. Once the concepts are clear, it is easier to find your way around. But it's useful to keep in mind that the docs can be a little outdated when it comes to any software. -Regards Rashmi - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tomcat deployment question
I have upgraded from Tomcat 3.3 to Tomcat 5.5.23. It is running on WinXP and I am using Java 1.5. I asked this question before with a different directory set up in which the myApp directory was under Tomcat heirarchy. As Rashmi Rubdi suggested, by renaming myApp.xml to ROOT.xml, I could access my application using http://localhost:8080 Chuck Caldarale said it is preferable to have myApp outside Tomcat's directory heirarchy. I am playing with a different directory structure as shown below. Here Tomcat heirarchy is outside the myApp heirarchy. Here's my dierctory set up: TOP_DIR --Tomcat55 {catalina.home} --bin -- conf -- Catalina --localhost myApp.xml --common --server --webapps -- myApp context.xml index.html --bin --html --jsp --css --jar --WEB-INF web.xml --classes --lib myApp.xml has the following: Context docBase=C:\TOP_DIR\myApp path=/myApp override=true privileged=true /Context context.xml under myApp has Context path=/myApp/ http://localhost:8080 brings up the default Tomcat homepage. I am NOT able to access my application as http://localhost:8080/myApp Ideally, I would like to access my application as http://localhost:8080. So what am I missing in my definitions in myApp.xml or myApp/context.xml? Thanks a lot Lakshmi - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat deployment question
Hi Lakshmi, I'll explain the way I got it to work - I think it's correct because I can access my app at the root context http://localhost:8080/ Please find my replies below: Of course you can undo all the changes mentioned below and bring it back to the original state at anytime. On 4/25/07, Lakshmi Venkataraman [EMAIL PROTECTED] wrote: Here's my dierctory set up: TOP_DIR --Tomcat55 {catalina.home} --bin -- conf -- Catalina --localhost myApp.xm In the above change myApp.xml to ROOT.xml --common --server --webapps -- myApp context.xml index.html --bin --html --jsp --css --jar --WEB-INF web.xml --classes --lib myApp.xml has the following: Context docBase=C:\TOP_DIR\myApp path=/myApp override=true privileged=true /Context Now myApp.xml is renamed to ROOT.xml , keep the path attribute empty as in path= the docBase attibute looks correct. It is also fine to keep your project outside Tomcat's webapps folder, it makes it easier to upgrade Tomcat in the future. context.xml under myApp has Context path=/myApp/ Also change path to path= in context.xml http://localhost:8080 brings up the default Tomcat homepage. After making the above configuration changes in ROOT.xml and context.xml the app should be accessible at http://localhost:8080/ I am NOT able to access my application as http://localhost:8080/myApp Ideally, I would like to access my application as http://localhost:8080. So what am I missing in my definitions in myApp.xml or myApp/context.xml? Thanks a lot Lakshmi The concept is that ROOT.xml represents the root context which corresponds to the first slash / after http://localhost:8080 If the context is called myApp.xml then naturally it is not the root context so it appears under the myApp context. Hope this clears things up. Regards -Rashmi - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tomcat deployment question
Hi Rashmi, Thanks! Worked! :) By renaming myApp.xml to ROOT.xml and changing path= in both ROOT.xml and myApp/context.xml, I can access my application as http://localhost:8080. But I am curious, why http://localhost:8080/myApp did NOT work? Thanks Lakshmi -Original Message- From: Rashmi Rubdi [mailto:[EMAIL PROTECTED] Sent: Wednesday, April 25, 2007 8:25 PM To: Tomcat Users List Subject: Re: Tomcat deployment question Hi Lakshmi, I'll explain the way I got it to work - I think it's correct because I can access my app at the root context http://localhost:8080/ Please find my replies below: Of course you can undo all the changes mentioned below and bring it back to the original state at anytime. On 4/25/07, Lakshmi Venkataraman [EMAIL PROTECTED] wrote: Here's my dierctory set up: TOP_DIR --Tomcat55 {catalina.home} --bin -- conf -- Catalina --localhost myApp.xm In the above change myApp.xml to ROOT.xml --common --server --webapps -- myApp context.xml index.html --bin --html --jsp --css --jar --WEB-INF web.xml --classes --lib myApp.xml has the following: Context docBase=C:\TOP_DIR\myApp path=/myApp override=true privileged=true /Context Now myApp.xml is renamed to ROOT.xml , keep the path attribute empty as in path= the docBase attibute looks correct. It is also fine to keep your project outside Tomcat's webapps folder, it makes it easier to upgrade Tomcat in the future. context.xml under myApp has Context path=/myApp/ Also change path to path= in context.xml http://localhost:8080 brings up the default Tomcat homepage. After making the above configuration changes in ROOT.xml and context.xml the app should be accessible at http://localhost:8080/ I am NOT able to access my application as http://localhost:8080/myApp Ideally, I would like to access my application as http://localhost:8080. So what am I missing in my definitions in myApp.xml or myApp/context.xml? Thanks a lot Lakshmi The concept is that ROOT.xml represents the root context which corresponds to the first slash / after http://localhost:8080 If the context is called myApp.xml then naturally it is not the root context so it appears under the myApp context. Hope this clears things up. Regards -Rashmi - 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]
RE: Tomcat deployment question
From: Lakshmi Venkataraman [mailto:[EMAIL PROTECTED] Subject: RE: Tomcat deployment question Chuck Caldarale said it is preferable to have myApp outside Tomcat's directory heirarchy. That's only true when your desired app name is not the same as the name of the .war file. TOP_DIR --Tomcat55 {catalina.home} -- conf -- Catalina --localhost myApp.xml The above declares that the URI path to your app is http://host/myApp, not the default. -- myApp context.xml No context.xml file should be at that location. Even if it were at an appropriate place (under the META-INF directory), it would be ignored, since you already have the defining one in conf/Catalina/localhost. myApp.xml has the following: Context docBase=C:\TOP_DIR\myApp path=/myApp override=true privileged=true /Context The path attribute is not allowed and may well be preventing the app from being deployed. Also, the use of a back slash in the docBase may cause difficulty, as some scanners interpret it as an escape character. A forward slash should always work, even on Windows. context.xml under myApp has Context path=/myApp/ A pointless exercise, since the context.xml file in that location will never be seen, and the path attribute is not allowed. http://localhost:8080 brings up the default Tomcat homepage. As expected and previously explained by several responders: the default app must be named ROOT; no ifs, ands, or buts. I am NOT able to access my application as http://localhost:8080/myApp Most likely due to the incorrect attributes on the Context element. Ideally, I would like to access my application as http://localhost:8080. Then you must name it ROOT, as everyone has been telling you. Remove the existing webapps/ROOT to avoid conflict. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use 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: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tomcat deployment question
From: Lakshmi Venkataraman [mailto:[EMAIL PROTECTED] Subject: RE: Tomcat deployment question When tomcat is started and starts reading htdocs.xml, I get the following message: Warning: a docBase w:\INM\Apache\htdocs\htdocs inside the host appBase has been defined and will be ignored. Again, the docBase attribute in a Context element should only be used when the webapp is located completely outside of Tomcat's directory structure. If the webapp is under appBase, you don't need (or want) a docBase attribute. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use 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: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tomcat deployment question
I have finally a working configuration. Please refer to the bottom of this email for the directory structure. In server.xml I changed appBase=webapps (original value) htdocs.xml is renamed as ROOT.xml as Rashmi suggested with docBase=${catalina.home}/htdocs Then I am able to type http://localhost:8080 which in turn looks up index.html from the htdocs directory Even so, I have some more questions and my understanding is not that clear yet. I will post the questions in my next email. Thanks Lakshmi -Original Message- From: Lakshmi Venkataraman [mailto:[EMAIL PROTECTED] Sent: Wednesday, April 18, 2007 9:33 PM To: Tomcat Users List Subject: RE: Tomcat deployment question Hi Rashmi, Thanks! I renamed htdocs.xml to ROOT.xml. http://localhost:8080 did not work. However, http://localhost:8080/htdocs/index.html worked which is some progress. I think my organization would prefer only http://localhost:8080 I am confused between the concepts appBase, docBase and path. So given the directory structure below, what should be the values of appBase, docBase and path so http://localhost:8080 looks for index.html under htdocs. Thanks again Lakshmi -Original Message- From: Rashmi Rubdi [mailto:[EMAIL PROTECTED] Sent: Wednesday, April 18, 2007 9:04 PM To: Tomcat Users List Subject: Re: Tomcat deployment question Hi Lakshmi, Rename the context file from htdocs.xml to ROOT.xml then you should be able to access the app at http://localhost:8080/ -Rashmi ---Original posting by Lakshmi --- I have upgraded from Tomcat 3.3 to Tomcat 5.5.23. It is running on WinXP and I am using Java 1.5. Here's my dierctory set up: ${Catalina.Home} -- conf -- Catalina --localhost htdocs.xml -- htdocs index.html --bin --html --jsp --css --jar --WEB-INF web.xml --classes --lib --webapps In server.xml, I modified the Host element to have {appBase=htdocs autoDeploy=false} I am using htdocs.xml in ${Catalina.home}/Catalina/localhost as the context descriptor and is defined as follows: Context docBase=${catalina.home} override=true privileged=true Loader className=com.example.appClassLoader reloadable=true/ !-- Default set of monitored resources -- WatchedResourceWEB-INF/web.xml/WatchedResource !-- Uncomment this to disable session persistence across Tomcat restarts -- Manager pathname= / /Context Tomcat is able to load appClassLoader. However, when I type, http://localhost:8080, it is not able to load the index.html found under the htdocs directory. If I create ROOT directory and move the index.html over there it is able to load it. I guess, my main problem is how can I maintain the same directory structure as above without having to create ROOT and move everything below it? The above directory structure worked in Tomcat 3.3. What am I missing? Thanks Lakshmi - 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] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tomcat deployment question
Please refer to the directory structure in the original message or At the bottom of this email. Given that directory structure, I have working configuration with appBase=webapps in server.xml (seems like a dummy value since we don't have anything in that directory). In ${catalina.home}/conf/catalina/localhost/ROOT.xml I have defined the Context element with docBase=${catalina.home}/htdocs. Here are the questions: Previously, I had appBase=htdocs and ROOT.xml was called htdocs.xml. 1) When absolute path such as ${catalina.home}/htdocs is specified why does it look for ${catalina.home}/htdocs/htdocs/ 2) Why does it expect a ROOT directory under htdocs? 3) What is special about ROOT? Should not the configuration be totally under application Developer's control? 4) What is path? It is not very clear from the documenatation. It took me a while to get to the current working Configuration. I will appreciate it if one of you can clarify these concepts. Thanks in advance, Lakshmi -Original Message- From: Lakshmi Venkataraman Sent: Wednesday, April 18, 2007 11:21 PM To: 'Tomcat Users List' Subject: RE: Tomcat deployment question I have finally a working configuration. Please refer to the bottom of this email for the directory structure. In server.xml I changed appBase=webapps (original value) htdocs.xml is renamed as ROOT.xml as Rashmi suggested with docBase=${catalina.home}/htdocs Then I am able to type http://localhost:8080 which in turn looks up index.html from the htdocs directory Even so, I have some more questions and my understanding is not that clear yet. I will post the questions in my next email. Thanks Lakshmi -Original Message- From: Lakshmi Venkataraman [mailto:[EMAIL PROTECTED] Sent: Wednesday, April 18, 2007 9:33 PM To: Tomcat Users List Subject: RE: Tomcat deployment question Hi Rashmi, Thanks! I renamed htdocs.xml to ROOT.xml. http://localhost:8080 did not work. However, http://localhost:8080/htdocs/index.html worked which is some progress. I think my organization would prefer only http://localhost:8080 I am confused between the concepts appBase, docBase and path. So given the directory structure below, what should be the values of appBase, docBase and path so http://localhost:8080 looks for index.html under htdocs. Thanks again Lakshmi -Original Message- From: Rashmi Rubdi [mailto:[EMAIL PROTECTED] Sent: Wednesday, April 18, 2007 9:04 PM To: Tomcat Users List Subject: Re: Tomcat deployment question Hi Lakshmi, Rename the context file from htdocs.xml to ROOT.xml then you should be able to access the app at http://localhost:8080/ -Rashmi ---Original posting by Lakshmi --- I have upgraded from Tomcat 3.3 to Tomcat 5.5.23. It is running on WinXP and I am using Java 1.5. Here's my dierctory set up: ${Catalina.Home} -- conf -- Catalina --localhost htdocs.xml -- htdocs index.html --bin --html --jsp --css --jar --WEB-INF web.xml --classes --lib --webapps In server.xml, I modified the Host element to have {appBase=htdocs autoDeploy=false} I am using htdocs.xml in ${Catalina.home}/Catalina/localhost as the context descriptor and is defined as follows: Context docBase=${catalina.home} override=true privileged=true Loader className=com.example.appClassLoader reloadable=true/ !-- Default set of monitored resources -- WatchedResourceWEB-INF/web.xml/WatchedResource !-- Uncomment this to disable session persistence across Tomcat restarts -- Manager pathname= / /Context Tomcat is able to load appClassLoader. However, when I type, http://localhost:8080, it is not able to load the index.html found under the htdocs directory. If I create ROOT directory and move the index.html over there it is able to load it. I guess, my main problem is how can I maintain the same directory structure as above without having to create ROOT and move everything below it? The above directory structure worked in Tomcat 3.3. What am I missing? Thanks Lakshmi - 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] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tomcat deployment question
From: Lakshmi Venkataraman [mailto:[EMAIL PROTECTED] Subject: RE: Tomcat deployment question Please refer to the directory structure in the original message or At the bottom of this email. Given that directory structure, I have working configuration with appBase=webapps in server.xml (seems like a dummy value since we don't have anything in that directory). The Host appBase attribute defines the default location for webapps. You don't have to use it, since it's often easier to keep your webapps completely outside of the Tomcat directory structure. In ${catalina.home}/conf/catalina/localhost/ROOT.xml I have defined the Context element with docBase=${catalina.home}/htdocs. This is probably not a good idea. If you're not going to put your webapps under the appBase directory, you're probably better off keeping them entirely outside of the Tomcat directory structure. Throwing things into arbitrary locations can be a maintenance mess, especially at upgrade time Previously, I had appBase=htdocs and ROOT.xml was called htdocs.xml. 1) When absolute path such as ${catalina.home}/htdocs is specified why does it look for ${catalina.home}/htdocs/htdocs/ I don't really understand the above question. Who is it? Where is the absolute path specified? What makes you think anyone or anything was looking for ${catalina.home}/htdocs/htdocs/? 2) Why does it expect a ROOT directory under htdocs? Because you specified appBase to be htdocs and did not have a ROOT.xml to override the default location. 3) What is special about ROOT? Should not the configuration be totally under application Developer's control? Some means of specifying the default webapp is necessary, and the Tomcat developers chose to use ROOT as the default. It's all in the docs: http://tomcat.apache.org/tomcat-5.5-doc/config/context.html 4) What is path? The path attribute for the Context element is no longer used, unless the Context element is within server.xml (strongly discouraged). Path in this instance refers to the URL sent by a client to access a webapp. It is not very clear from the documenatation. It took me a while to get to the current working Configuration. It may be working, but I wouldn't leave it that way. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use 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: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tomcat deployment question
Thanks Chuck! See my comments inline starting with Lakshmi: -Original Message- From: Caldarale, Charles R [mailto:[EMAIL PROTECTED] Sent: Thursday, April 19, 2007 12:58 PM To: Tomcat Users List Subject: RE: Tomcat deployment question From: Lakshmi Venkataraman [mailto:[EMAIL PROTECTED] Subject: RE: Tomcat deployment question Please refer to the directory structure in the original message or At the bottom of this email. Given that directory structure, I have working configuration with appBase=webapps in server.xml (seems like a dummy value since we don't have anything in that directory). The Host appBase attribute defines the default location for webapps. You don't have to use it, since it's often easier to keep your webapps completely outside of the Tomcat directory structure. In ${catalina.home}/conf/catalina/localhost/ROOT.xml I have defined the Context element with docBase=${catalina.home}/htdocs. This is probably not a good idea. If you're not going to put your webapps under the appBase directory, you're probably better off keeping them entirely outside of the Tomcat directory structure. Throwing things into arbitrary locations can be a maintenance mess, especially at upgrade time Previously, I had appBase=htdocs and ROOT.xml was called htdocs.xml. 1) When absolute path such as ${catalina.home}/htdocs is specified why does it look for ${catalina.home}/htdocs/htdocs/ I don't really understand the above question. Who is it? Where is the absolute path specified? What makes you think anyone or anything was looking for ${catalina.home}/htdocs/htdocs/? Lakshmi: It is Tomcat. I am referring to ${catalina.home}/htdocs as absoulte path. It becomes absolute after ${catalina.home} is expanded. When tomcat is started and starts reading htdocs.xml, I get the following message: Warning: a docBase w:\INM\Apache\htdocs\htdocs inside the host appBase has been defined and will be ignored. In addition, I get java.lang.IllegalArgumentException saying that the ROOT directory does not exist or is unreadable. 2) Why does it expect a ROOT directory under htdocs? Because you specified appBase to be htdocs and did not have a ROOT.xml to override the default location. 3) What is special about ROOT? Should not the configuration be totally under application Developer's control? Some means of specifying the default webapp is necessary, and the Tomcat developers chose to use ROOT as the default. It's all in the docs: http://tomcat.apache.org/tomcat-5.5-doc/config/context.html 4) What is path? The path attribute for the Context element is no longer used, unless the Context element is within server.xml (strongly discouraged). Path in this instance refers to the URL sent by a client to access a webapp. It is not very clear from the documenatation. It took me a while to get to the current working Configuration. It may be working, but I wouldn't leave it that way. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use 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: 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]
Re: Tomcat deployment question
Hi Lakshmi, Rename the context file from htdocs.xml to ROOT.xml then you should be able to access the app at http://localhost:8080/ -Rashmi - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tomcat deployment question
Hi Rashmi, Thanks! I renamed htdocs.xml to ROOT.xml. http://localhost:8080 did not work. However, http://localhost:8080/htdocs/index.html worked which is some progress. I think my organization would prefer only http://localhost:8080 I am confused between the concepts appBase, docBase and path. So given the directory structure below, what should be the values of appBase, docBase and path so http://localhost:8080 looks for index.html under htdocs. Thanks again Lakshmi -Original Message- From: Rashmi Rubdi [mailto:[EMAIL PROTECTED] Sent: Wednesday, April 18, 2007 9:04 PM To: Tomcat Users List Subject: Re: Tomcat deployment question Hi Lakshmi, Rename the context file from htdocs.xml to ROOT.xml then you should be able to access the app at http://localhost:8080/ -Rashmi ---Original posting by Lakshmi --- I have upgraded from Tomcat 3.3 to Tomcat 5.5.23. It is running on WinXP and I am using Java 1.5. Here's my dierctory set up: ${Catalina.Home} -- conf -- Catalina --localhost htdocs.xml -- htdocs index.html --bin --html --jsp --css --jar --WEB-INF web.xml --classes --lib In server.xml, I modified the Host element to have {appBase=htdocs autoDeploy=false} I am using htdocs.xml in ${Catalina.home}/Catalina/localhost as the context descriptor and is defined as follows: Context docBase=${catalina.home} override=true privileged=true Loader className=com.example.appClassLoader reloadable=true/ !-- Default set of monitored resources -- WatchedResourceWEB-INF/web.xml/WatchedResource !-- Uncomment this to disable session persistence across Tomcat restarts -- Manager pathname= / /Context Tomcat is able to load appClassLoader. However, when I type, http://localhost:8080, it is not able to load the index.html found under the htdocs directory. If I create ROOT directory and move the index.html over there it is able to load it. I guess, my main problem is how can I maintain the same directory structure as above without having to create ROOT and move everything below it? The above directory structure worked in Tomcat 3.3. What am I missing? Thanks Lakshmi - 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]