views:

652

answers:

2

I have loaded a static (no servlets, jsp etc) website into the webapps folder of Tomcat.

I have an index.html file under webapps/ourcompany so when I click the ourcompany link in the tomcat manager I am expecting to be taken to the ourcompany/index.html page. However Tomcat keeps redirecting me to localhost:8080/ourcompany/www.ourcompany.org/index.html

The funny thing is when I first loaded this site, that was the correct URL as most of the content was in a folder called www.ourcompany.org - I moved the content "up a level (in terms of folder structure)" to "clean up" the folder structure and get a more pleasing address. I guess that may have something to do with it.

How can I get the link in the Tomcat manager to take me to localhost:8080/ourcompany/index.html rather than localhost:8080/ourcompany/www.ourcompany.org/index.html

+1  A: 

Is there something in the index.html redirecting you to www.ourcompany.org/index.html?

Some piece of javascript, a meta refresh, etc?

matt b
Good idea, I checked though, unfortunately that's not it
Ankur
It seems you might be right. I changed the index.html page to something simple - and that works as expected, so somewhere where I can't find it there probably is a redirect
Ankur
+1  A: 

Check the web.xml of your webapp and see what file is mentioned in the welcomelist tag. See if that is wrong or open that file and see if its redirecting to localhost:8080/ourcompany/www.ourcompany.org/index.html url.

Bhushan
This is not a war, just a static page, so there is no web.xml
Ankur
Then check the index.html to see if it is redirecting to that url. See if there is any META tag or any javascript function.
Bhushan