File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Tomcat and the fly likes How to change the Default Home Page of Tomcat? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Tomcat
Bookmark "How to change the Default Home Page of Tomcat?" Watch "How to change the Default Home Page of Tomcat?" New topic
Author

How to change the Default Home Page of Tomcat?

Ajay Njallacattu
Ranch Hand

Joined: Nov 21, 2006
Posts: 39
Dear All,

Please give a solution by which you can change the Default Page of Tomcat.

When I type in http://localhost:8080/ I need to get a page in my application for e.g. http://localhost:8080/onjava/Login.jsp.

Can anyone help me in this.

Thanks in advance for the help.

Regards

Ajay Joseph
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42936
    
  68
The easiest would be to have the Tomcat home page (TOMCAT_HOME/webapps/ROOT/index.jsp) perform a redirect to your start page.

Or, if you have just a single web app, you can move that to the ROOT web app.
Sagar Rohankar
Ranch Hand

Joined: Feb 19, 2008
Posts: 2902
    
    1

Edit, webapp/ROOT/index.html and forward to the /onjava/Login.jsp


[LEARNING bLOG] | [Freelance Web Designer] | [and "Rohan" is part of my surname]
Ajay Njallacattu
Ranch Hand

Joined: Nov 21, 2006
Posts: 39
Thanks a lot for the quick reply.

But if i forward to my Page from the index.html on ROOT, it will affect other applications which are in the same Webserver.
Can we do something specific only to this application.

Regards

Ajay Joseph
Sagar Rohankar
Ranch Hand

Joined: Feb 19, 2008
Posts: 2902
    
    1

Ajay Njallacattu wrote:But if i forward to my Page from the index.html on ROOT, it will affect other applications which are in the same Webserver.

No, the other apps won't get affected by simple editing in the ROOT/index.html/jsp, also before editing the index file, please take the backup it.
Ajay Njallacattu
Ranch Hand

Joined: Nov 21, 2006
Posts: 39
Hi,

Sorry for another question.

Currently I have an onjava project and my java prject in my Tomcat.
If I channge this settings in the ROOT folder for my onjava project, will it affect the 'myjava' project.

Regards

Ajay Joseph
Sagar Rohankar
Ranch Hand

Joined: Feb 19, 2008
Posts: 2902
    
    1

Ajay Njallacattu wrote:If I channge this settings in the ROOT folder for my onjava project, will it affect the 'myjava' project.

NO. There is no dependency exists between any web apps deployed in Tomcat's 'webapps' folder.
Samuel Behrman
Ranch Hand

Joined: Oct 02, 2009
Posts: 49
Hi, Ajay Njallacattu.
Please refer to the url below:
http://blog.watashii.com/2008/10/how-to-change-default-homepage-in-tomcat/
http://www.ehow.com/how_5255698_change-default-apache-tomcat.html


RAQ Report: Web-based Excel-like Java reporting tool.
Ankush Bhargava
Greenhorn

Joined: Dec 03, 2004
Posts: 19
Ulf Dittmer wrote:The easiest would be to have the Tomcat home page (TOMCAT_HOME/webapps/ROOT/index.jsp) perform a redirect to your start page.

Or, if you have just a single web app, you can move that to the ROOT web app.


Thanks! Worked for me.
Samuel Behrman
Ranch Hand

Joined: Oct 02, 2009
Posts: 49
Please refer to the url below:
http://www.ehow.com/how_5255698_change-default-apache-tomcat.html
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to change the Default Home Page of Tomcat?