How to get a welcome page from Tomcat root and not a webapp context?

In Tomcat 7, I want my welcome page (index.html) to load when I access localhost: 8080 /. Right now, I need to go into the webapp context, localhost: 8080 / MyWebApp.

Is there a folder in Tomcat to host pages that are not part of webapp? I am confused how this works ...

EDIT: I noticed that web.xml for the Server in Eclipse has a servlet called "default" that maps to "/" ... I wonder if I need to change something?

EDIT2: I found this: http://wiki.apache.org/tomcat/HowTo#How_do_I_override_the_default_home_page_loaded_by_Tomcat.3F

But I already have index.html in my ROOT folder and still get 404 from the root URL. If I start the server without using Eclipse, it works. What's going on here? What exactly does Eclipse do when you start the server through it? Obviously, it does not play the ROOT folder of my installation.

+5
source share
4 answers

ROOT 'webapps' - , . ROOT " " tomcat. tar ../webapps, .

+1

Tomcat . .

0

Apache Tomcat - -. Tomcat, // -.

, tomcat/webapps/index.html - , webapp , URL.

- webapps tomcat, -. , index.html , .. /, " ", , url, .

, - .

0

All Articles