Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Fix formatting and links.

...

For other parameters, look at the following pages:

If you are running Tomcat as a Windows service, then environment variables and setenv.bat script have no effect. The relevant settings for the service wrapper application are stored in the Windows registry. They can be edited via Configuration application (tomcat<N>w.exe). See "Java" tab in the configuration dialog. The{{-Xms}} and -Xmx options are configured in fields named "Initial memory pool" and "Maximum memory pool". Other options can be added to "Java Options" field as if they were specified on the command line of java executable.

...

Congratulations. You have created and tested a first web application (traditionally called "mywebapp"), users can access it via the URL "http://myhost.company.com/mywebapp". You are very proud and satisfied. But now, how do you change the setup, so that "mywebapp" gets called when the user enters the URL "http://myhost.company.com" ?

...

The

...

pages

...

and

...

code

...

of

...

your

...

"mywebapp"

...

application

...

currently

...

reside

...

in

...

(CATALINA_BASE)/webapps/mywebapp/.

...

In

...

a

...

standard

...

Tomcat

...

installation,

...

you

...

will

...

notice

...

that

...

under

...

the

...

same

...

directory

...

(CATALINA_BASE)/webapps/,

...

there

...

is

...

a

...

directory

...

called

...

ROOT

...

(the

...

capitals

...

are

...

important,

...

even

...

under

...

Windows).

...

That

...

is

...

the

...

residence

...

of

...

the

...

current

...

Tomcat

...

default

...

application,

...

the

...

one

...

that

...

is

...

called

...

right

...

now

...

when

...

a

...

user

...

calls

...

up

...

"http://myhost.company.com

...

[:port

...

]".

...

The

...

trick

...

is

...

to

...

put

...

your

...

application

...

in

...

its

...

place.

First stop Tomcat.
Then before you replace the current default application, it may be a good idea to make a copy of it somewhere else.
Then delete everything under the ROOT directory, and move everything that was previously under the (CATALINA_BASE)/webapps/mywebapp/ directory, toward this (CATALINA_BASE)/webapps/ROOT directory. In other words, what was previously .../mywebapp/WEB-INF should now be .../ROOT/WEB-INF (and not .../ROOT/mywebapp/WEB-INF).

...

For more information about this topic in general, consult this page : "Configuration Reference / Context"

Addendum 2: If for some reason you want another method..

If, for some reason, you do not want to deploy your application under the CATALINA_BASE/webapps/ROOT subdirectory, or you do not want to name your war-file "ROOT.war", then read on. But you should first read this : "Configuration Reference / Context" and make sure you understand the implications.

...