tags:

views:

21

answers:

1

Hi My question is aimed at understanding the application of the Tomcat 5(s) web server, I'm student who's still learning so bare with me if I sound ignorant.

I was wondering if it was posible to maintain a directory structure within the application folder in side webapps folder, i.e. I have created a folder called ITC357, which acts as my application folder which carries all my files, so the directory path is as follows:

C:/Program Files/Tomcat5/webapps/ITC357

I'm doing an assignment and I would like to deploy that ITC357 in a separate folder can I do this? if so how?

+1  A: 

It is not clear what you are asking:

  • If you asking if it is possible to have directories inside C:/Program Files/Tomcat5/webapps/ITC357 then the answer is "Yes".

  • If you are asking if it is possible to put your webapps file in a separate directory then the answer is "Inadvisable". The tomcat framework looks for certain files within the webapps/<name> tree; e.g. a context.xml file, a web.xml file, classes / JARs, etc. You could code your servlet to look for other things in other places, but this causes various problems with deployment (and undeployment) and security.

If that doesn't cover it, please clarify your question.

Stephen C
Hi Stephan, thanks for the reply; Sorry for bean confusing, I even confuse myself, anyway it's the first option you've mentioned. What I want is to have separate folders for the user interface part of the site: C:/Program Files/Tomcat5/ITC357/UI (for example) this will contain all the .html .jsp images etc.
Kushan
@Kushan - that will work. Of course, your servlets, resources, etc need to use the appropriate paths relative to the webapp URL, etc.
Stephen C
@Stephan - Thanks for that, I was unsure of this
Kushan