wood burning stoves*
The moose likes Tomcat and the fly likes Default Web Application Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Default Web Application" Watch "Default Web Application" New topic
Author

Default Web Application

Simon Joseph Aquilina
Ranch Hand

Joined: Feb 14, 2006
Posts: 102
Hello,

I have successfully deployed a web application on Tomcat5.0. Now when I enter http://localhost/ I get the Tomcat default page and if I enter http://localhost/myapp/ I get my application.

Is it possible to make Tomcat load my app when the user enters the http://localhost/? (that is set a default web application)

regards,
Sim085
John Smith
Greenhorn

Joined: Aug 21, 2006
Posts: 13
modify /conf/server.xml
Simon Joseph Aquilina
Ranch Hand

Joined: Feb 14, 2006
Posts: 102
Thanks

I had givin a look to the server.xml file before however I could not understand what I need to change.

Could you give me a hint on what needs to be changed? or the whole file needs to be modified?

thanks and regards,
Sim085
Simon Joseph Aquilina
Ranch Hand

Joined: Feb 14, 2006
Posts: 102
Hi,

I am sory to post again. However I have been searching in the server.xml file but can not understand what I need to change.

I also tried using the tomcat managment system (which comes automatically when I enter http://localhost/).

What needs to be change from the server.xml file so that my web application will be loaded as default when entering http://localhost/?

thanks and regards,
Sim085
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

The simplest way to do this is to rename your app to ROOT and remove the current (default) app with that name.


Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
Reshma Sreenivasulu
Greenhorn

Joined: Dec 08, 2005
Posts: 8
Hi Simon,

Try this.

Give this within the <Host></Host> element in the conf/server.xml.

<Context path="" docBase="yourAppName" debug="0"/>

Hope it helps.


Reshma
Simon Joseph Aquilina
Ranch Hand

Joined: Feb 14, 2006
Posts: 102
Thank you very much for the replies. I used the what Reshma sugests (Thanks). However, how can I now access the Tomcat manager?

Also wanted to ask (curiosity) what is the best option? Rename your application as 'ROOT' or else enter that change Reshma sugested.

Thanks again for all the help

Regards,
Sim085
[ August 31, 2006: Message edited by: Simon Joseph Aquilina ]
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12787
    
    5
Also wanted to ask (curiosity) what is the best option? Rename your application as 'ROOT' or else enter that change Reshma sugested.


I prefer renaming my app to ROOT as being the simplest and having no chance of a typo getting into the xml file.
Bill
Simon Joseph Aquilina
Ranch Hand

Joined: Feb 14, 2006
Posts: 102
Thanks I will keep the root option in mind.

However I have a further problem on how to access the Tomcat Admin Console from the web. This was very helpfull to restart the application when needed since it allowed the me to restart the applications remotly (without having to go physically on the server).

How is it possible to acces this? I tried renaming the root folder, but did not have any luck.

Regards,
Sim085
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Default Web Application