1

I need to deploy some files to a Tomcat App Server, is it possible to access the root directory of an application, and upload files to a folder?

I have only used Apache WebServer thus far, and I can add files using something like filezilla to upload my website. In this case I just need to upload some files for download.

How can I setup a downloads folder, in tomcat?

2 Answers 2

0

If you don't specify which kind of files you have it is difficult. Do you have both static and dynamic content? App deploying is not quite the same as in Apache. I assume you have the right folder structure, your xml descriptors and so on. For this you have to theck the servlets specification version you are using, Tomcat version... With this, you have to upload files to webapps folder. You can upload a war file or an exploded folder with all contents (which structure do you have), althought the latest is not recommended. Tomcat may start to deploy before all files are uploaded.

Could you specify a little more?

4
  • Yes. I need to create an upload folder, this folder will contain uploaded zip files. My issue is that I don't know how to access my webapps folder so that I can setup an ftp client that uploads files... I am also not sure that there isn't the need for a redeployment. I am currently deploying my webapp as a war. I upload the war file into tomcat.
    – Astronaut
    Jun 6, 2013 at 8:56
  • Then I guess your question is not Tomcat related, but an FTP one. By default, and out-of-the-box Tomcat deploys whatever it finds in 'webapps' directory. You don't need to do anything else. If you deploy a war file, you only have to overwrite the existing one, it usually (not 100%) is enough to deploy a new version. To configure the FTP you should look in other questions, I guess, or read the manual. If what you don't know is how to configure the FTP to read/write only webapps directory, chroot the user, and make a link from webapps to whatever home directory the user has (supposing Linux).
    – Mike B
    Jun 6, 2013 at 9:13
  • Ok Mike Ill look into that. And do I need to redeploy tomcat or will the users be able to access the upload folder.
    – Astronaut
    Jun 6, 2013 at 9:47
  • I don't know if I understand the question. You could let the users access to the folder, that's a permissions issue. What you have to take into account is that everytime Tomcat detects the war file changes, it will redeploy it (the application). If somebody is using the application, his browsing will probably be ruined (as long as persistent sessions are not implemented).
    – Mike B
    Jun 6, 2013 at 15:44
0

If the only thing you need to deploy is a WAR, there's a package in most linux repos called tomcat-admin that provides a web interface to upload a WAR file directly.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .