Re: End user files uploaded to sftp getting stored in tomcat root directory
Much appreciated your detailed response Chris, I’ll investigate upon these points and try to discuss with the developer. Thanks once again.!! On Tue, 9 Aug 2022 at 5:20 PM Christopher Schultz < ch...@christopherschultz.net> wrote: > Farash, > > On 8/9/22 09:23, Farash Ahamad wrote: > > Hi Chris, > > > > There is an application portal running on tomcat used by many users, > where > > they create profiles, upload documents, etc. > > When they upload the document via portal, the application pushes it to > sftp > > on another server, but sometimes a copy is stored in the root directory > > tomcat server with exact details like filename, size, etc. > > So your users upload to your application, which then uploads the file > via sftp? > > My guess is that your application does something like this: > > public void service(Request, Response) { >String filename = Request.getParameter("filename"); >InputStream in = Request.getInputStream(); > >OutputStream out = new FileOutputStream(filename); >while(in.read(...)) { > out.write(...); >} >out.close(); >in.close(); > >FTPClient client = new FTPClient(); >client.connect(); >client.put(filename); > } > > By using the Tomcat server as a temporary location for files, there is > the possibility that uploaded-files will stick-around in that directory, > especially if the code isn't very careful about resource-management and > error-handling. > > I would immediately audit your code for the following: > > 1. Proper destination directory. If users can upload files to your > Tomcat directory, what happens if I upload a .jsp file and then request > that file over HTTP from your server? Will it execute the file? :0 You > should write all files into the container-provided temp directory. Ask > if you don't know what this it. > > 2. Filename sanitization. If a user can upload a file, can they > overwrite local files? Can they perform directory-traversals? What > happens if I upload /etc/passwd or conf/server.xml? > > 3. Proper resource management (e.g. look for close() and delete() for > everything you do locally) > > 4. Maybe you don't even need to store the file locally. Does your sftp > client library allow you to stream files directly to the remote server? > It would be better to never write the file bytes onto the Tomcat server > in the first place. > > Hope that helps, > -chris > > > On Tue, Aug 9, 2022 at 4:18 PM Christopher Schultz < > > ch...@christopherschultz.net> wrote: > > > >> Farash, > >> > >> On 8/9/22 04:55, Farash Ahamad wrote: > >>> Just to add, the file is getting uploaded to SFTP server, but there is > an > >>> exact copy in tomcat server as well. > >> > >> Can you give more details? Is a human user pushing via sftp to your > >> Tomcat server? Or is your Tomcat-deployed application pushing via sftp > >> to another server? Or something more complicated? > >> > >> Is the Tomcat server hosting the sftp server / destination? > >> > >> -chris > >> > >>> On Tue, Aug 9, 2022 at 11:46 AM Mark Thomas wrote: > >>> > This will always be an application issue. > > Mark > > > On 09/08/2022 09:41, Farash Ahamad wrote: > > Dear All, > > > > I am observing there and several documents (pdf, png, jpeg, etc) > which > the > > end user uploads in the application getting stored in tomcat / > >> directory. > > > > I would like to understand whether this is a bug in the application > >> code > or > > in tomcat. > > > > Application based on: Java Spring Boot 2.1.3 > > Tomcat version: 9.0.41 > > OS Version: RHEL 7.9 > > Document Destination: SFTP server (Unified gluster FS through Serv-U) > > > > Appreciate your help. > > > > Thanks & Regards, > > Farash Ahamad > > > > - > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > > > >>> > >> > >> - > >> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > >> For additional commands, e-mail: users-h...@tomcat.apache.org > >> > >> > > > > - > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > >
Re: End user files uploaded to sftp getting stored in tomcat root directory
Farash, On 8/9/22 09:23, Farash Ahamad wrote: Hi Chris, There is an application portal running on tomcat used by many users, where they create profiles, upload documents, etc. When they upload the document via portal, the application pushes it to sftp on another server, but sometimes a copy is stored in the root directory tomcat server with exact details like filename, size, etc. So your users upload to your application, which then uploads the file via sftp? My guess is that your application does something like this: public void service(Request, Response) { String filename = Request.getParameter("filename"); InputStream in = Request.getInputStream(); OutputStream out = new FileOutputStream(filename); while(in.read(...)) { out.write(...); } out.close(); in.close(); FTPClient client = new FTPClient(); client.connect(); client.put(filename); } By using the Tomcat server as a temporary location for files, there is the possibility that uploaded-files will stick-around in that directory, especially if the code isn't very careful about resource-management and error-handling. I would immediately audit your code for the following: 1. Proper destination directory. If users can upload files to your Tomcat directory, what happens if I upload a .jsp file and then request that file over HTTP from your server? Will it execute the file? :0 You should write all files into the container-provided temp directory. Ask if you don't know what this it. 2. Filename sanitization. If a user can upload a file, can they overwrite local files? Can they perform directory-traversals? What happens if I upload /etc/passwd or conf/server.xml? 3. Proper resource management (e.g. look for close() and delete() for everything you do locally) 4. Maybe you don't even need to store the file locally. Does your sftp client library allow you to stream files directly to the remote server? It would be better to never write the file bytes onto the Tomcat server in the first place. Hope that helps, -chris On Tue, Aug 9, 2022 at 4:18 PM Christopher Schultz < ch...@christopherschultz.net> wrote: Farash, On 8/9/22 04:55, Farash Ahamad wrote: Just to add, the file is getting uploaded to SFTP server, but there is an exact copy in tomcat server as well. Can you give more details? Is a human user pushing via sftp to your Tomcat server? Or is your Tomcat-deployed application pushing via sftp to another server? Or something more complicated? Is the Tomcat server hosting the sftp server / destination? -chris On Tue, Aug 9, 2022 at 11:46 AM Mark Thomas wrote: This will always be an application issue. Mark On 09/08/2022 09:41, Farash Ahamad wrote: Dear All, I am observing there and several documents (pdf, png, jpeg, etc) which the end user uploads in the application getting stored in tomcat / directory. I would like to understand whether this is a bug in the application code or in tomcat. Application based on: Java Spring Boot 2.1.3 Tomcat version: 9.0.41 OS Version: RHEL 7.9 Document Destination: SFTP server (Unified gluster FS through Serv-U) Appreciate your help. Thanks & Regards, Farash Ahamad - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: End user files uploaded to sftp getting stored in tomcat root directory
Hi Chris, There is an application portal running on tomcat used by many users, where they create profiles, upload documents, etc. When they upload the document via portal, the application pushes it to sftp on another server, but sometimes a copy is stored in the root directory tomcat server with exact details like filename, size, etc. Regards, Farash On Tue, Aug 9, 2022 at 4:18 PM Christopher Schultz < ch...@christopherschultz.net> wrote: > Farash, > > On 8/9/22 04:55, Farash Ahamad wrote: > > Just to add, the file is getting uploaded to SFTP server, but there is an > > exact copy in tomcat server as well. > > Can you give more details? Is a human user pushing via sftp to your > Tomcat server? Or is your Tomcat-deployed application pushing via sftp > to another server? Or something more complicated? > > Is the Tomcat server hosting the sftp server / destination? > > -chris > > > On Tue, Aug 9, 2022 at 11:46 AM Mark Thomas wrote: > > > >> This will always be an application issue. > >> > >> Mark > >> > >> > >> On 09/08/2022 09:41, Farash Ahamad wrote: > >>> Dear All, > >>> > >>> I am observing there and several documents (pdf, png, jpeg, etc) which > >> the > >>> end user uploads in the application getting stored in tomcat / > directory. > >>> > >>> I would like to understand whether this is a bug in the application > code > >> or > >>> in tomcat. > >>> > >>> Application based on: Java Spring Boot 2.1.3 > >>> Tomcat version: 9.0.41 > >>> OS Version: RHEL 7.9 > >>> Document Destination: SFTP server (Unified gluster FS through Serv-U) > >>> > >>> Appreciate your help. > >>> > >>> Thanks & Regards, > >>> Farash Ahamad > >>> > >> > >> - > >> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > >> For additional commands, e-mail: users-h...@tomcat.apache.org > >> > >> > > > > - > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > >
Re: End user files uploaded to sftp getting stored in tomcat root directory
Farash, On 8/9/22 04:55, Farash Ahamad wrote: Just to add, the file is getting uploaded to SFTP server, but there is an exact copy in tomcat server as well. Can you give more details? Is a human user pushing via sftp to your Tomcat server? Or is your Tomcat-deployed application pushing via sftp to another server? Or something more complicated? Is the Tomcat server hosting the sftp server / destination? -chris On Tue, Aug 9, 2022 at 11:46 AM Mark Thomas wrote: This will always be an application issue. Mark On 09/08/2022 09:41, Farash Ahamad wrote: Dear All, I am observing there and several documents (pdf, png, jpeg, etc) which the end user uploads in the application getting stored in tomcat / directory. I would like to understand whether this is a bug in the application code or in tomcat. Application based on: Java Spring Boot 2.1.3 Tomcat version: 9.0.41 OS Version: RHEL 7.9 Document Destination: SFTP server (Unified gluster FS through Serv-U) Appreciate your help. Thanks & Regards, Farash Ahamad - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: End user files uploaded to sftp getting stored in tomcat root directory
Thanks Mark! Just to add, the file is getting uploaded to SFTP server, but there is an exact copy in tomcat server as well. On Tue, Aug 9, 2022 at 11:46 AM Mark Thomas wrote: > This will always be an application issue. > > Mark > > > On 09/08/2022 09:41, Farash Ahamad wrote: > > Dear All, > > > > I am observing there and several documents (pdf, png, jpeg, etc) which > the > > end user uploads in the application getting stored in tomcat / directory. > > > > I would like to understand whether this is a bug in the application code > or > > in tomcat. > > > > Application based on: Java Spring Boot 2.1.3 > > Tomcat version: 9.0.41 > > OS Version: RHEL 7.9 > > Document Destination: SFTP server (Unified gluster FS through Serv-U) > > > > Appreciate your help. > > > > Thanks & Regards, > > Farash Ahamad > > > > - > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > >
Re: End user files uploaded to sftp getting stored in tomcat root directory
This will always be an application issue. Mark On 09/08/2022 09:41, Farash Ahamad wrote: Dear All, I am observing there and several documents (pdf, png, jpeg, etc) which the end user uploads in the application getting stored in tomcat / directory. I would like to understand whether this is a bug in the application code or in tomcat. Application based on: Java Spring Boot 2.1.3 Tomcat version: 9.0.41 OS Version: RHEL 7.9 Document Destination: SFTP server (Unified gluster FS through Serv-U) Appreciate your help. Thanks & Regards, Farash Ahamad - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
End user files uploaded to sftp getting stored in tomcat root directory
Dear All, I am observing there and several documents (pdf, png, jpeg, etc) which the end user uploads in the application getting stored in tomcat / directory. I would like to understand whether this is a bug in the application code or in tomcat. Application based on: Java Spring Boot 2.1.3 Tomcat version: 9.0.41 OS Version: RHEL 7.9 Document Destination: SFTP server (Unified gluster FS through Serv-U) Appreciate your help. Thanks & Regards, Farash Ahamad
Re: [OT] Removing Tomcat ROOT directory causes the server to hang on startup
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Don, On 4/22/20 09:12, Clough, Don wrote: > Thanks for all the feedback! I will continue to debug why our > particular installation hangs when I remove the ROOT. I was able to > do this on a fresh installation on my local machine. Take some thread dumps to find out what's happening. Wild guess without any other information: you are out of entropy, and you'll find that either TLS initialization or session-manager initialization is where things hang-up. (This will have nothing to do with the presence of the ROOT web app). - -chris > -Original Message- From: Christopher Schultz > Sent: Tuesday, April 21, 2020 6:33 > PM To: users@tomcat.apache.org Subject: Re: [OT] Removing Tomcat > ROOT directory causes the server to hang on startup > > Don, > > On 4/21/20 09:20, Clough, Don wrote: >> Is it possible to remove the tomcat ROOT directory? We have >> several applications running on a tomcat instance. I was asked to >> clean the webapps directory up and remove any unused folders. > This is a good idea. But it's also a good idea to have a ROOT web > application. It just doesn't have to be (and shouldn't be!) the > default Tomcat root web application. > > Why? > > Well, if you navigate to /doesnotexist.html or > /does/not/exist.html, unless your application is ROOT or happens to > be mounted on "/does", Tomcat has no application to "assign" the > request to, so it MUST generate a generic error message. > > If you want to be able to handle all possible 404 responses with a > nice, application-branded "not found" page, you'll need to roll a > ROOT web application which has just some basic configuration for > things like errors, and the pages which will be returned when you > get those errors. > > -chris > > - > > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > > Disclaimer > > The information contained in this communication from the sender is confidential. It is intended solely for use by the recipient and others authorized to receive it. If you are not the recipient, you are hereby notified that any disclosure, copying, distribution or taking action in relation of the contents of this information is strictly prohibited and may be unlawful. > > This email has been scanned for viruses and malware, and may have been automatically archived by Mimecast Ltd, an innovator in Software as a Service (SaaS) for business. Providing a safer and more useful place for your human generated data. Specializing in; Security, archiving and compliance. To find out more visit the Mimecast website. > -BEGIN PGP SIGNATURE- Comment: Using GnuPG with Thunderbird - https://www.enigmail.net/ iQIzBAEBCAAdFiEEMmKgYcQvxMe7tcJcHPApP6U8pFgFAl6gWkoACgkQHPApP6U8 pFjuHQ/8DMMu5QK9+RuOzxfTV8mTEltNjwC30HoK+jlWWUTMevPDEoa8h5NNZVUK FdIPaI5eSYqpkdv9WEFZoY9ANhclClfTSHoGSl823qCjrR/D0lHi9p6hVPgWTN3a F2FjgkkO/d7rFexZCJO0poE5BXyPKfMUePP6KPE99MB+GFJ+oPFBA7UDbyv2L0Ev 4PShWSVpps5eTLB05DZoOdM3qIhXgoqwn4a5cG8DixE3jPQsTVtyYF91b3YgH34g YkY0j7F80EiCdYRM4QggxOvpqwrMGsNdtlT6kyU+mixZvD2PV5Yblex1yG0cHim4 uoa2/Jo//I5nVQupAuImjnDZ4476131l7yY4HvgcmG4VqheUn4FwxhdrK4b+019K xYk6QcpUuY+e4MFhB3xe0Qa227C8Qk2rlZGGYpwrO/P2BAuSJcjwoqUOJ/WAsIqZ Sqh8aNsCvZO8z+aGdvawTwnLWez/zgBI0FlIvJpj16csNpc+pgYwiz0FQE5gIpo6 1NdKE03DkgaffcI2gAm2/Ofzh4jl2ce/BDWf+ENm9YP8zNJoZLbZC8ITPfISX/pw Cl5UxtMKF9lcxEiZKxYfcHKjryPlTyQLejP1qRbfbnqBx9+OPd6esFYeH5UgwqwF qBTh/urA6j6hgUWRXqKkKx0G/kZ9G9TZV3jUAPMYzZUol9kF+Vo= =8hg5 -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: [OT] Removing Tomcat ROOT directory causes the server to hang on startup
Thanks for all the feedback! I will continue to debug why our particular installation hangs when I remove the ROOT. I was able to do this on a fresh installation on my local machine. -Original Message- From: Christopher Schultz Sent: Tuesday, April 21, 2020 6:33 PM To: users@tomcat.apache.org Subject: Re: [OT] Removing Tomcat ROOT directory causes the server to hang on startup -BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Don, On 4/21/20 09:20, Clough, Don wrote: > Is it possible to remove the tomcat ROOT directory? We have several > applications running on a tomcat instance. I was asked to clean the > webapps directory up and remove any unused folders. This is a good idea. But it's also a good idea to have a ROOT web application. It just doesn't have to be (and shouldn't be!) the default Tomcat root web application. Why? Well, if you navigate to /doesnotexist.html or /does/not/exist.html, unless your application is ROOT or happens to be mounted on "/does", Tomcat has no application to "assign" the request to, so it MUST generate a generic error message. If you want to be able to handle all possible 404 responses with a nice, application-branded "not found" page, you'll need to roll a ROOT web application which has just some basic configuration for things like errors, and the pages which will be returned when you get those errors. - -chris -BEGIN PGP SIGNATURE- Comment: Using GnuPG with Thunderbird - https://www.enigmail.net/ iQIzBAEBCAAdFiEEMmKgYcQvxMe7tcJcHPApP6U8pFgFAl6fdIgACgkQHPApP6U8 pFjbmhAAqcqiusrD++bvPNY2BuQmd3eLV8P7Hyis9s9US+E55hPM0WyiZGjfSohQ Cb1FOpyUvt1WMx/irY8RY+o3aBAYYV8iHR7ydabFRyMhoFQYPislwvW9XnGHKIvE fQx8p+Z4Vr32GywvrbhFGA7eeQrN+j5jfv/pt8fCTDTSpchTgmfOEIbfKi+BcoMg ljvJmww+0XDY+z0SgZo47Nczw18WP9pOa0Q8xxHHw1tVLJRLG1RW6Z/B7+BE6UdH r6ly1A3I59duBHiummwiMOBBGivXaP090lM9GHCWHhkrP32YjXpb34HPt3QcoV5K ZRep0g06EyyUt1TR2aCzLDAN8zsCq6nJJsXrovXrsm60fJ+aLir3PAfyEsTYEPR7 r5HsJO3T+gpIwqb/lpxSAaML5VbmVNf8dpih5Q2iS2dELGN9WddiEZOO60ztXWfQ KofJbuqIsnmD2XcZTexdCoJmKb+3huOmW6LWtZ+6hrq/9EgvI4ZfV3DvdRELC/JL f7u/3AbuPo8vg/H81KEaqZja6RxhuDjoSV+w08zyaaXupNPi5rG3zoNajgmatfpf GCZNSVnu7++Rk0HDwuFgbNyqDa0Po7Ah33HNUe7K3fpFIHEC7+vDN9A3kXjPjNaA F45M3l8Z1BKsW0GK+kFcL0/Cn514CrcioQae62nyvZw9U4wm9rI= =B8Ar -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org Disclaimer The information contained in this communication from the sender is confidential. It is intended solely for use by the recipient and others authorized to receive it. If you are not the recipient, you are hereby notified that any disclosure, copying, distribution or taking action in relation of the contents of this information is strictly prohibited and may be unlawful. This email has been scanned for viruses and malware, and may have been automatically archived by Mimecast Ltd, an innovator in Software as a Service (SaaS) for business. Providing a safer and more useful place for your human generated data. Specializing in; Security, archiving and compliance. To find out more visit the Mimecast website.
Re: [OT] Removing Tomcat ROOT directory causes the server to hang on startup
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Don, On 4/21/20 09:20, Clough, Don wrote: > Is it possible to remove the tomcat ROOT directory? We have > several applications running on a tomcat instance. I was asked to > clean the webapps directory up and remove any unused folders. This is a good idea. But it's also a good idea to have a ROOT web application. It just doesn't have to be (and shouldn't be!) the default Tomcat root web application. Why? Well, if you navigate to /doesnotexist.html or /does/not/exist.html, unless your application is ROOT or happens to be mounted on "/does", Tomcat has no application to "assign" the request to, so it MUST generate a generic error message. If you want to be able to handle all possible 404 responses with a nice, application-branded "not found" page, you'll need to roll a ROOT web application which has just some basic configuration for things like errors, and the pages which will be returned when you get those errors. - -chris -BEGIN PGP SIGNATURE- Comment: Using GnuPG with Thunderbird - https://www.enigmail.net/ iQIzBAEBCAAdFiEEMmKgYcQvxMe7tcJcHPApP6U8pFgFAl6fdIgACgkQHPApP6U8 pFjbmhAAqcqiusrD++bvPNY2BuQmd3eLV8P7Hyis9s9US+E55hPM0WyiZGjfSohQ Cb1FOpyUvt1WMx/irY8RY+o3aBAYYV8iHR7ydabFRyMhoFQYPislwvW9XnGHKIvE fQx8p+Z4Vr32GywvrbhFGA7eeQrN+j5jfv/pt8fCTDTSpchTgmfOEIbfKi+BcoMg ljvJmww+0XDY+z0SgZo47Nczw18WP9pOa0Q8xxHHw1tVLJRLG1RW6Z/B7+BE6UdH r6ly1A3I59duBHiummwiMOBBGivXaP090lM9GHCWHhkrP32YjXpb34HPt3QcoV5K ZRep0g06EyyUt1TR2aCzLDAN8zsCq6nJJsXrovXrsm60fJ+aLir3PAfyEsTYEPR7 r5HsJO3T+gpIwqb/lpxSAaML5VbmVNf8dpih5Q2iS2dELGN9WddiEZOO60ztXWfQ KofJbuqIsnmD2XcZTexdCoJmKb+3huOmW6LWtZ+6hrq/9EgvI4ZfV3DvdRELC/JL f7u/3AbuPo8vg/H81KEaqZja6RxhuDjoSV+w08zyaaXupNPi5rG3zoNajgmatfpf GCZNSVnu7++Rk0HDwuFgbNyqDa0Po7Ah33HNUe7K3fpFIHEC7+vDN9A3kXjPjNaA F45M3l8Z1BKsW0GK+kFcL0/Cn514CrcioQae62nyvZw9U4wm9rI= =B8Ar -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Removing Tomcat ROOT directory causes the server to hang on startup
On 4/21/20 6:20 AM, Clough, Don wrote: Is it possible to remove the tomcat ROOT directory? We have several applications running on a tomcat instance. I was asked to clean the webapps directory up and remove any unused folders. Of course it is. The ROOT that comes with Tomcat is simply a demonstration webapp, and can be removed and/or replaced like any other webapp. Our normal "new installation" procedure, for example, is to remove everything but manager and host-manager, and plug our own webapp in as the ROOT context. -- James H. H. Lampert Touchtone Corporation - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Removing Tomcat ROOT directory causes the server to hang on startup
On 21/04/2020 14:20, Clough, Don wrote: > Good Morning, > > Tomcat version 8.5.15 > > Is it possible to remove the tomcat ROOT directory? We have several > applications running on a tomcat instance. I was asked to clean the > webapps directory up and remove any unused folders. I removed manager > host-manager docs examples Everything is fine, as I expected. I looked > at the ROOT folder an there are images, a couple of jsp pages and a > WEB-INF directory. None of these are used by our applications, so I > removed the ROOT directory. Now the server hangs on startup and my > applications don't start. Can the ROOT directory be removed? It appears > that according to the Apache docs it is optional: > > "The ROOT web application presents a very low security risk but it does > include the version of Tomcat that is being used. The ROOT web > application should normally be removed from a publicly accessible Tomcat > instance, not for security reasons, but so that a more appropriate > default page is shown to users." > > I tried leaving just an empty ROOT directory, but it still hangs. Is > there a configuration that I'm missing somewhere that could be looking > for the ROOT directory? Not in Tomcat. Possibly in one of the additional applications that has been deployed. Tomcat 8.5.x starts quite happily with the ROOT web application removed. Mark - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Removing Tomcat ROOT directory causes the server to hang on startup
On Tue, Apr 21, 2020, 08:20 Clough, Don wrote: > Good Morning, > > Tomcat version 8.5.15 > > Is it possible to remove the tomcat ROOT directory? > Yes - not required ... unless you want the functionality provided therein.
Removing Tomcat ROOT directory causes the server to hang on startup
Good Morning, Tomcat version 8.5.15 Is it possible to remove the tomcat ROOT directory? We have several applications running on a tomcat instance. I was asked to clean the webapps directory up and remove any unused folders. I removed manager host-manager docs examples Everything is fine, as I expected. I looked at the ROOT folder an there are images, a couple of jsp pages and a WEB-INF directory. None of these are used by our applications, so I removed the ROOT directory. Now the server hangs on startup and my applications don't start. Can the ROOT directory be removed? It appears that according to the Apache docs it is optional: "The ROOT web application presents a very low security risk but it does include the version of Tomcat that is being used. The ROOT web application should normally be removed from a publicly accessible Tomcat instance, not for security reasons, but so that a more appropriate default page is shown to users." I tried leaving just an empty ROOT directory, but it still hangs. Is there a configuration that I'm missing somewhere that could be looking for the ROOT directory? Thanks, Don Don Clough | Java Developer National Association of State Workforce Agencies 444 North Capitol St., NW | Suite 142 | Washington, DC 20001 E dclo...@naswa.org<mailto:dclo...@naswa.org>| W naswa.org<http://www.naswa.org/> [naswa] [naswa2]<https://twitter.com/NASWAORG> [naswa3] <https://www.linkedin.com/company/national-asociation-of-state-workforce-agencies> [naswa4] <https://www.facebook.com/NASWAorg/> Disclaimer The information contained in this communication from the sender is confidential. It is intended solely for use by the recipient and others authorized to receive it. If you are not the recipient, you are hereby notified that any disclosure, copying, distribution or taking action in relation of the contents of this information is strictly prohibited and may be unlawful. This email has been scanned for viruses and malware, and may have been automatically archived by Mimecast Ltd, an innovator in Software as a Service (SaaS) for business. Providing a safer and more useful place for your human generated data. Specializing in; Security, archiving and compliance. To find out more visit the Mimecast website.
Re: Tomcat ROOT webapp homepage
On 15/11/2012 21:33, Leo Donahue - RDSA IT wrote: -Original Message- From: Pid * [mailto:p...@pidster.com] Sent: Thursday, November 15, 2012 2:25 PM Subject: Re: Tomcat ROOT webapp homepage On 15 Nov 2012, at 18:06, Leo Donahue - RDSA IT leodona...@mail.maricopa.gov wrote: Who designed the Tomcat ROOT webapp homepage? Which version? 7.0 = me. Yes, sorry. 7.0.32 Was it just notepad as the design tool? Not notepad, why? I like the layout and wanted to know how you came up with the rounded divs that look nice in Firefox. I saw the css page that specified the rounded nature of those lower boxes (answered that myself since original post). Too bad IE9 can't get on the wagon and display those right. What did you use to visualize the overall layout? Or did you just sketch it out in your head? Either way, nice work. I used a TextMate a browser. HTML + CSS + F5 == instant feedback, no need for a GUI tool. p -- [key:62590808] signature.asc Description: OpenPGP digital signature
Tomcat ROOT webapp homepage
Who designed the Tomcat ROOT webapp homepage? Was it just notepad as the design tool? Leo
Re: Tomcat ROOT webapp homepage
On 15 Nov 2012, at 18:06, Leo Donahue - RDSA IT leodona...@mail.maricopa.gov wrote: Who designed the Tomcat ROOT webapp homepage? Which version? 7.0 = me. Was it just notepad as the design tool? Not notepad, why? p Leo - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Tomcat ROOT webapp homepage
-Original Message- From: Pid * [mailto:p...@pidster.com] Sent: Thursday, November 15, 2012 2:25 PM Subject: Re: Tomcat ROOT webapp homepage On 15 Nov 2012, at 18:06, Leo Donahue - RDSA IT leodona...@mail.maricopa.gov wrote: Who designed the Tomcat ROOT webapp homepage? Which version? 7.0 = me. Yes, sorry. 7.0.32 Was it just notepad as the design tool? Not notepad, why? I like the layout and wanted to know how you came up with the rounded divs that look nice in Firefox. I saw the css page that specified the rounded nature of those lower boxes (answered that myself since original post). Too bad IE9 can't get on the wagon and display those right. What did you use to visualize the overall layout? Or did you just sketch it out in your head? Either way, nice work. Leo
Re: listing directory content outside tomcat root
hi christopher, On Thu, Feb 25, 2010 at 9:33 PM, Christopher Schultz ch...@christopherschultz.net wrote: You shouldn't declare Context elements within conf/server.xml in any currently-supported version of Tomcat. Instead, put everything you need in your webapp's META-INF/context.xml file. Remember that path and docBase parameters are not allowed. ok, but since /path_to_some_dir/ is outside tomcat root ( $CATALINA_HOME ), how can I tell tomcat to look for /path_to_some_dir/META-INF/context.xml file? -- ciao, ivan - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: listing directory content outside tomcat root
On 26/02/2010 08:27, Ivan Longhi wrote: hi christopher, On Thu, Feb 25, 2010 at 9:33 PM, Christopher Schultz ch...@christopherschultz.net wrote: You shouldn't declareContext elements within conf/server.xml in any currently-supported version of Tomcat. Instead, put everything you need in your webapp's META-INF/context.xml file. Remember that path and docBase parameters are not allowed. ok, but since /path_to_some_dir/ is outside tomcat root ( $CATALINA_HOME ), how can I tell tomcat to look for /path_to_some_dir/META-INF/context.xml file? In that case, the method is to manually deploy the context.xml as conf/Catalina/hostname/appname.xml. You may set a docBase in this situation. p - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
listing directory content outside tomcat root
hi, I would like to list the content of a directory outside tomcat root without enabling the listings parameter in default servlet. conf/web.xml servlet servlet-namedefault/servlet-name servlet-classorg.apache.catalina.servlets.DefaultServlet/servlet-class init-param param-namelistings/param-name param-valuefalse/param-value /init-param /servlet conf/server.xml . Host name=localhost appBase=webapps unpackWARs=true autoDeploy=true xmlValidation=false xmlNamespaceAware=false Context path=/test docBase=/path_to_some_dir/ Parameter name=listings value=true / /Context .. if I try to get a file inside the dir it works ( http://localhost:8080/test/some_file.txt ) but if I try to list the content of the directory ( http://localhost:8080/test/ ) I get 404. any idea? thanks ciao, ivan - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: listing directory content outside tomcat root
Enable listings is sort of** a global setting. Since the default servlet is declared in conf/web.xml - its inherited in *every* webapp. So its config is also inherited. (Bummer) BUT - if you add a WEB-INF/web.xml to EVERY webapp with the default servlet settings - then you can remove the default servlet config from conf/web.xml and have the default servlet per webapp config. That means - in docBase=/path_to_some_dir/ -- you need /path_to_some_dir/WEB-INF/web.xml What I forget is - what happens if you only create /path_to_some_dir/WEB-INF/web.xml and leave conf/web.xml alone. Which of course would be the easiest thing to do. -Tim On 2/25/2010 6:22 AM, Ivan Longhi wrote: hi, I would like to list the content of a directory outside tomcat root without enabling the listings parameter in default servlet. conf/web.xml servlet servlet-namedefault/servlet-name servlet-classorg.apache.catalina.servlets.DefaultServlet/servlet-class init-param param-namelistings/param-name param-valuefalse/param-value /init-param /servlet conf/server.xml . Host name=localhost appBase=webapps unpackWARs=true autoDeploy=true xmlValidation=false xmlNamespaceAware=false Context path=/test docBase=/path_to_some_dir/ Parameter name=listings value=true / /Context .. if I try to get a file inside the dir it works ( http://localhost:8080/test/some_file.txt ) but if I try to list the content of the directory ( http://localhost:8080/test/ ) I get 404. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: listing directory content outside tomcat root
thanks!!! this should be the solution (and one more little question at the end of code): conf/web.xml servlet servlet-namedefault/servlet-name servlet-classorg.apache.catalina.servlets.DefaultServlet/servlet-class init-param param-namelistings/param-name param-valuefalse/param-value !-- FALSE to avoid inheritance to all webapps -- /init-param /servlet conf/server.xml . Host name=localhost appBase=webapps unpackWARs=true autoDeploy=true xmlValidation=false xmlNamespaceAware=false Context path=/test docBase=/path_to_some_dir/ Parameter name=listings value=true / /Context .. /path_to_some_dir/WEB-INF/web.xml web-app ... servlet servlet-nametest/servlet-name servlet-classorg.apache.catalina.servlets.DefaultServlet/servlet-class init-param param-namelistings/param-name param-valuetrue/param-value /init-param load-on-startup1/load-on-startup /servlet servlet-mapping servlet-nametest/servlet-name url-pattern//url-pattern /servlet-mapping /web-app is servlet-classorg.apache.catalina.servlets.DefaultServlet/servlet-class the right solution? thanks, ivan On Thu, Feb 25, 2010 at 1:19 PM, Tim Funk funk...@apache.org wrote: Enable listings is sort of** a global setting. Since the default servlet is declared in conf/web.xml - its inherited in *every* webapp. So its config is also inherited. (Bummer) BUT - if you add a WEB-INF/web.xml to EVERY webapp with the default servlet settings - then you can remove the default servlet config from conf/web.xml and have the default servlet per webapp config. That means - in docBase=/path_to_some_dir/ -- you need /path_to_some_dir/WEB-INF/web.xml What I forget is - what happens if you only create /path_to_some_dir/WEB-INF/web.xml and leave conf/web.xml alone. Which of course would be the easiest thing to do. -Tim On 2/25/2010 6:22 AM, Ivan Longhi wrote: hi, I would like to list the content of a directory outside tomcat root without enabling the listings parameter in default servlet. conf/web.xml servlet servlet-namedefault/servlet-name servlet-classorg.apache.catalina.servlets.DefaultServlet/servlet-class init-param param-namelistings/param-name param-valuefalse/param-value /init-param /servlet conf/server.xml . Host name=localhost appBase=webapps unpackWARs=true autoDeploy=true xmlValidation=false xmlNamespaceAware=false Context path=/test docBase=/path_to_some_dir/ Parameter name=listings value=true / /Context .. if I try to get a file inside the dir it works ( http://localhost:8080/test/some_file.txt ) but if I try to list the content of the directory ( http://localhost:8080/test/ ) I get 404. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org -- ciao, ivan - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: listing directory content outside tomcat root
ops Parameter name=listings value=true / is useless On Thu, Feb 25, 2010 at 3:14 PM, Ivan Longhi ivan.lon...@gmail.com wrote: Context path=/test docBase=/path_to_some_dir/ Parameter name=listings value=true / /Context -- ciao, ivan - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: listing directory content outside tomcat root
From: Tim Funk [mailto:funk...@apache.org] Subject: Re: listing directory content outside tomcat root Since the default servlet is declared in conf/web.xml - its inherited in *every* webapp. So its config is also inherited. (Bummer) Not a bummer at all - it's a very good thing. BUT - if you add a WEB-INF/web.xml to EVERY webapp with the default servlet settings - then you can remove the default servlet config from conf/web.xml and have the default servlet per webapp config. Not needed and way more work than necessary. What I forget is - what happens if you only create /path_to_some_dir/WEB-INF/web.xml and leave conf/web.xml alone. Which of course would be the easiest thing to do. And it's what you should do. url-pattern elements in a webapp's WEB-INF/web.xml override the ones in the global conf/web.xml, so put the following in /path_to_some_dir/WEB-INF/web.xml: servlet servlet-namelocalDefault/servlet-name servlet-classorg.apache.catalina.servlets.DefaultServlet/servlet-class init-param param-namedebug/param-name param-value0/param-value /init-param init-param param-namelistings/param-name param-valuetrue/param-value /init-param load-on-startup1/load-on-startup /servlet servlet-mapping servlet-namelocalDefault/servlet-name url-pattern//url-pattern /servlet-mapping - 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 unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: listing directory content outside tomcat root
From: Ivan Longhi [mailto:ivan.lon...@gmail.com] Subject: Re: listing directory content outside tomcat root is servlet-classorg.apache.catalina.servlets.DefaultServlet /servlet-class the right solution? Yes. - 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 unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: listing directory content outside tomcat root
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Ivan, On 2/25/2010 9:14 AM, Ivan Longhi wrote: this should be the solution (and one more little question at the end of code): conf/web.xml servlet servlet-namedefault/servlet-name servlet-classorg.apache.catalina.servlets.DefaultServlet/servlet-class init-param param-namelistings/param-name param-valuefalse/param-value !-- FALSE to avoid inheritance to all webapps -- /init-param /servlet This should be the default, so no changes to conf/web.xml should be necessary. conf/server.xml . Host name=localhost appBase=webapps unpackWARs=true autoDeploy=true xmlValidation=false xmlNamespaceAware=false Context path=/test docBase=/path_to_some_dir/ Parameter name=listings value=true / /Context You shouldn't declare Context elements within conf/server.xml in any currently-supported version of Tomcat. Instead, put everything you need in your webapp's META-INF/context.xml file. Remember that path and docBase parameters are not allowed. Also, Parameter name=listings value=true / has no effect whatsoever on your configuration. You can remove it. Given that, you don't even need a META-INF/context.xml since there's nothing to add to the default. /path_to_some_dir/WEB-INF/web.xml web-app ... servlet servlet-nametest/servlet-name servlet-classorg.apache.catalina.servlets.DefaultServlet/servlet-class init-param param-namelistings/param-name param-valuetrue/param-value /init-param load-on-startup1/load-on-startup /servlet servlet-mapping servlet-nametest/servlet-name url-pattern//url-pattern /servlet-mapping /web-app The above changes to WEB-INF/web.xml are all you need. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkuG3p8ACgkQ9CaO5/Lv0PDx2gCguuCNrDrO4sy2HChs99FKotYZ VlkAnAsk0dyM1Kv8ckFuHxiSxW2MH3TT =csil -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: tomcat ROOT
Excellent; thanks! Johnny Kewl wrote: - Original Message - From: Rusty Wright [EMAIL PROTECTED] To: Markus Lord [EMAIL PROTECTED]; Tomcat Users List users@tomcat.apache.org Sent: Tuesday, October 07, 2008 11:31 PM Subject: Re: tomcat ROOT Hi Markus, did you ever figure this out? I was looking in the archives of the tomcat mailing list and saw your query but it didn't seem to me that anyone answered it fully, at least not for me. I figured out that I could remove/rename the webapps/ROOT directory and deploy my war file as ROOT.war and then it would replace tomcat's web page at http://www.myhost.edu/ but I also have apache in front of tomcat and I don't understand how to set up the jkmount in my httpd.conf file to map apache's root to tomcat's root. Yes renaming a webapp to ROOT with a empty context path, makes it run as the root... Then... JkMount / worker1 Should make apache send it to your tomcat root --- HARBOR : http://www.kewlstuff.co.za/index.htm The most powerful application server on earth. The only real POJO Application Server. See it in Action : http://www.kewlstuff.co.za/cd_tut_swf/whatisejb1.htm --- - 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 ROOT
Not naive at all; I think it's an entirely relevant and obvious question. In my situation we have a system that's administered by a different group than mine (we're merely application programmers) and the system administrators have settled on doing things this way. They're understaffed and overworked so having a common setup for everyone on this shared system seems reasonable to me. André Warnier wrote: Johnny Kewl wrote: - Original Message - From: Rusty Wright [EMAIL PROTECTED] To: Markus Lord [EMAIL PROTECTED]; Tomcat Users List users@tomcat.apache.org Sent: Tuesday, October 07, 2008 11:31 PM Subject: Re: tomcat ROOT Hi Markus, did you ever figure this out? I was looking in the archives of the tomcat mailing list and saw your query but it didn't seem to me that anyone answered it fully, at least not for me. I figured out that I could remove/rename the webapps/ROOT directory and deploy my war file as ROOT.war and then it would replace tomcat's web page at http://www.myhost.edu/ but I also have apache in front of tomcat and I don't understand how to set up the jkmount in my httpd.conf file to map apache's root to tomcat's root. Yes renaming a webapp to ROOT with a empty context path, makes it run as the root... Then... JkMount / worker1 Should make apache send it to your tomcat root My naive question then would be : why keep Apache in front of Tomcat, if you are redirecting/proxying everything anyway ? - 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 ROOT
Hi Markus, did you ever figure this out? I was looking in the archives of the tomcat mailing list and saw your query but it didn't seem to me that anyone answered it fully, at least not for me. I figured out that I could remove/rename the webapps/ROOT directory and deploy my war file as ROOT.war and then it would replace tomcat's web page at http://www.myhost.edu/ but I also have apache in front of tomcat and I don't understand how to set up the jkmount in my httpd.conf file to map apache's root to tomcat's root. Markus Lord wrote: I have apache acting as a proxy for my tomcat and I'm wondering how I can get this one application 'myapp' to show up without having the directory name in the url. So what I'm looking to do is have it as www.mysite.com instead of www.mysite.com/myapp. Thanks in advance. Markus - 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 ROOT
- Original Message - From: Rusty Wright [EMAIL PROTECTED] To: Markus Lord [EMAIL PROTECTED]; Tomcat Users List users@tomcat.apache.org Sent: Tuesday, October 07, 2008 11:31 PM Subject: Re: tomcat ROOT Hi Markus, did you ever figure this out? I was looking in the archives of the tomcat mailing list and saw your query but it didn't seem to me that anyone answered it fully, at least not for me. I figured out that I could remove/rename the webapps/ROOT directory and deploy my war file as ROOT.war and then it would replace tomcat's web page at http://www.myhost.edu/ but I also have apache in front of tomcat and I don't understand how to set up the jkmount in my httpd.conf file to map apache's root to tomcat's root. Yes renaming a webapp to ROOT with a empty context path, makes it run as the root... Then... JkMount / worker1 Should make apache send it to your tomcat root --- HARBOR : http://www.kewlstuff.co.za/index.htm The most powerful application server on earth. The only real POJO Application Server. See it in Action : http://www.kewlstuff.co.za/cd_tut_swf/whatisejb1.htm --- - 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 ROOT
Johnny Kewl wrote: - Original Message - From: Rusty Wright [EMAIL PROTECTED] To: Markus Lord [EMAIL PROTECTED]; Tomcat Users List users@tomcat.apache.org Sent: Tuesday, October 07, 2008 11:31 PM Subject: Re: tomcat ROOT Hi Markus, did you ever figure this out? I was looking in the archives of the tomcat mailing list and saw your query but it didn't seem to me that anyone answered it fully, at least not for me. I figured out that I could remove/rename the webapps/ROOT directory and deploy my war file as ROOT.war and then it would replace tomcat's web page at http://www.myhost.edu/ but I also have apache in front of tomcat and I don't understand how to set up the jkmount in my httpd.conf file to map apache's root to tomcat's root. Yes renaming a webapp to ROOT with a empty context path, makes it run as the root... Then... JkMount / worker1 Should make apache send it to your tomcat root My naive question then would be : why keep Apache in front of Tomcat, if you are redirecting/proxying everything anyway ? - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
tomcat ROOT
I have apache acting as a proxy for my tomcat and I'm wondering how I can get this one application 'myapp' to show up without having the directory name in the url. So what I'm looking to do is have it as www.mysite.com instead of www.mysite.com/myapp. Thanks in advance. Markus
Re: tomcat ROOT
Hi Markus, You can configure your worker tomcat in such a way that the needed /-worker is mapped to the desired port and server.Similarly i think you can map the Context as well!!I hope so!! Regards, Thangavel Sankaranarayanan Markus Lord [EMAIL PROTECTED] sait.ca To users@tomcat.apache.org 09/09/2008 12:21 cc AM Subject tomcat ROOT Please respond to Tomcat Users List [EMAIL PROTECTED] che.org I have apache acting as a proxy for my tomcat and I'm wondering how I can get this one application 'myapp' to show up without having the directory name in the url. So what I'm looking to do is have it as www.mysite.com instead of www.mysite.com/myapp. Thanks in advance. Markus - 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 ROOT
Assuming you are deploying by dropping myapp.war into webapps: 1. Delete webapps/ROOT ; 2. Rename myapp.war to ROOT.war (case is important here) 3. Deploy your new ROOT.war in webapps. 4. Since ROOT is the default that tomcat will run when it can't match the incoming request, www.mysite.com will invoke ROOT which will be your myapp. --Ken On Sep 8, 2008, at 2:51 PM, Markus Lord wrote: I have apache acting as a proxy for my tomcat and I'm wondering how I can get this one application 'myapp' to show up without having the directory name in the url. So what I'm looking to do is have it as www.mysite.com instead of www.mysite.com/myapp . Thanks in advance. Markus - 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: Deploying apps outside of the Tomcat root
Place a context entry in server.xml and let its docBase point your custom folder. Regards, Mohan -Original Message- From: Richard K Miller [mailto:[EMAIL PROTECTED] Sent: Sunday, November 26, 2006 10:21 AM To: users@tomcat.apache.org Subject: Deploying apps outside of the Tomcat root Hi, I'm new to Tomcat and would appreciate any help with the following question: I have Tomcat 6 running on my Mac. I can access http://localhost: 8080/docs, /examples, etc. However, I would like to deploy a project in my home folder. This folder contains a WEB-INF folder and all the jsp files. How can I switch Tomcat to point to /Users/me/dev/myproject/web instead of /usr/ local/tomcat/webapps where it currently is? (I can't move my project into the webapps folder because it needs to be at the web root and I'd prefer to keep it separate from the Tomcat installation anyway.) Thanks for your help. Best regards, Richard - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This email is confidential. If you are not the addressee tell the sender immediately and destroy this email without using, sending or storing it. Emails are not secure and may suffer errors, viruses, delay, interception and amendment. Standard Chartered PLC and subsidiaries (SCGroup) do not accept liability for damage caused by this email and may monitor email traffic. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Deploying apps outside of the Tomcat root
Hi, I'm new to Tomcat and would appreciate any help with the following question: I have Tomcat 6 running on my Mac. I can access http://localhost: 8080/docs, /examples, etc. However, I would like to deploy a project in my home folder. This folder contains a WEB-INF folder and all the jsp files. How can I switch Tomcat to point to /Users/me/dev/myproject/web instead of /usr/ local/tomcat/webapps where it currently is? (I can't move my project into the webapps folder because it needs to be at the web root and I'd prefer to keep it separate from the Tomcat installation anyway.) Thanks for your help. Best regards, Richard - 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: Deploying apps outside of the Tomcat root
From: Richard K Miller [mailto:[EMAIL PROTECTED] Subject: Deploying apps outside of the Tomcat root However, I would like to deploy a project in my home folder. This folder contains a WEB-INF folder and all the jsp files. How can I switch Tomcat to point to /Users/me/dev/myproject/web instead of /usr/local/tomcat/webapps where it currently is? You need to become familiar with this: http://tomcat.apache.org/tomcat-6.0-doc/config/context.html The default app must be named ROOT - no ifs, ands, or buts. You can achieve this in one of three ways. If you want only your app to be available via Tomcat, change the appBase attribute of your Host element in conf/server.xml to point to the directory immediately above your application instead of webapps, and rename the directory your app is in to ROOT. If you want to keep the existing Tomcat apps (other than the normal ROOT), you must first delete the existing webapps/ROOT directory (or rename it). Following that, you can either move your app into webapps/ROOT, or create conf/[engine]/[host]/ROOT.xml containing a Context element with a docBase attribute pointing to your app. (Unless you've changed them, [engine] is Catalina, and [host] is localhost.) - 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]