Hello Syed Taj

> yeah thats what even i thought, but my web pages are not visible if i put
> <myappl> directory directly under webapps, only if i put it under ROOT doed
> the server even display the web pages.


You are mistaken. 

Placing your 'myapp' directory under the ROOT context simply means that your
web pages are *nested* in a ROOT context sub-directory.

In other words your web pages are assumed to belong to the ROOT context, and
your 'myapp' folder is treated as a sub-directory and *not* as a separate
context.

By the way, in servlet containers such as Tomcat the word 'context' is
synonymous with the word 'application'. (They mean the same thing.)

If you want to create your *own* separate application (context) then you
must place it under the $CATALINA_HOME/webapps directory - not under ROOT.

One thing you must *not* do is have a ROOT sub-directory that is the same
name as a directory (folder) that represents a context (application) in the
'webapps' directory.

So if your application (context) is called 'banana' then you must not have
this:


$CATALINA_HOME/
    |
    ---- webapps/
           |
           ---- ROOT/
           |      |
           |      ---- banana/
           |
           ---- banana/


You should delete the $CATALINA_HOME/webapps/ROOT/banana sub-directory.

Odd as it may seem, you could place a web page called (say) 'yellow.jsp'
under either of the two 'banana' directories shown above and you would call
that page with the same (!) URL:


    http://localhost:8080/banana/yellow.jsp


If the 'yellow.jsp' sits under the $CATALINA_HOME/webapps/ROOT/banana
directory then it is treated as belonging to the ROOT context (application).

If 'yellow.jsp' sits under the $CATALINA_HOME/banana directory then it is
treated as belonging to the 'banana' context (application).

The difference is important!

Finally, you say that 'my web pages are not visible if i put <myappl>
directory directly under webapps'.

All I can suggest is that you are doing something wrong, because this aspect
of Tomcat is rock-solid and works 100%.

So try again, and make sure you do not have a ROOT sub-directory that
conflicts with the name of your 'myapp' context, whatever that is.

If you are still having problems, start a new thread on this forum, giving
all the relevant details, and I'm sure you will be helped.

I'm off on holiday now, so I cannot follow up on this I'm afraid.

Good luck!

Harry


>> From: Harry Mantheakis <[EMAIL PROTECTED]>
>> Reply-To: "Tomcat Users List" <[EMAIL PROTECTED]>
>> To: Tomcat Users List <[EMAIL PROTECTED]>
>> Subject: Re: Tomcat configuration
>> Date: Sun, 04 Apr 2004 20:08:19 +0100
>> 
>> Hello
>> 
>> ROOT is the default context (application). By default, ROOT handles
>> requests
>> that do not specify an application. Hence this URL:
>> 
>> 
>>      http://localhost:8080/
>> 
>> 
>> Would be handled by the 'ROOT' application, which displays the Tomcat
>> welcome page. You can re-configure this, of course, but that is how it is
>> set up by default.
>> 
>> Your 'myapplication' directory (and everything it contains) should not be
>> located within the ROOT directory. It should be located within the
>> 'webapps'
>> directory.
>> 
>> HTH
>> 
>> Harry


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to