| Author |
Tomcat question
|
Roel De Nijs
Bartender
Joined: Jul 19, 2004
Posts: 4352
|
|
|
I got http://localhost:8080/app and it's working fine. When i go to http://localhost:8080/ , i get the index.jsp page of directory ROOT. Is there any possible way to go to http://localhost:8080/app when some user types http://localhost:8080/
|
SCJA, SCJP (1.4 | 5.0 | 6.0), SCJD
http://www.javaroe.be/
|
 |
Tim Baker
Ranch Hand
Joined: Oct 04, 2003
Posts: 541
|
|
Backup your server.xml before editing it! look in your server.xml file and look at the <Host> tags Find the one where "docBase" points to the ROOT folder and change that folder to your app folder. That will point both /app and / to your same application. Another option would be to change the "path" attribute in your apps <Host> to be "/" and then rename the one that said "/" before to be "/oldroot" or delete it altogether!
|
Kim Jong II (North Korea's Dear Leader) said:Nuclear weapons don't kill people, people kill people.
|
 |
Roel De Nijs
Bartender
Joined: Jul 19, 2004
Posts: 4352
|
|
I'm working with Tomcat 5.0.28 and i can't find a Host tag where docBase points to root. And i tought all the hosts-config files are under conf/Catalina/localhost. Also there isn't a ROOT.xml, where there is so for all my other web-apps. So i added a Context-tag to server.xml as follows and that does the job also, but in my web.xml of my web-app i got some env-entries and there aren't found when i go to this app with http://localhost:8080/ (So i guess i also have to put the web.xml of my app under the ROOT/WEB-INF/ ) if i go to url http://localhost:8080/ i got tomcat's homepage. Is there a possibility to disable this? I deleted the index.jsp and added a index.html saying "Forbidden, no access for you", and changed the welcome-list in the web.xml under ROOT/WEB-INF/
Another option would be to change the "path" attribute in your apps <Host> to be "/" and then rename the one that said "/" before to be "/oldroot" or delete it altogether!
This i don't get. Could you explain little bit more please
|
 |
Tim Baker
Ranch Hand
Joined: Oct 04, 2003
Posts: 541
|
|
Ok, pretty much ignore anything I said in the post above. What I think you need to do is to edit $TOMCAT_HOME/webapps/ROOT/WEB-INF/web.xml and remove the mapping of index.jsp Then edit your own web.xml in /webapps/yourapp/WEB-INF and create a similar mapping, so you may want to map "/index.jsp" or just "/"
|
 |
 |
|
|
subject: Tomcat question
|
|
|