• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to change the Default Home Page of Tomcat?

 
Ajay Njallacattu
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Rancher
Posts: 42968
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 2907
1
Java Spring Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Edit, webapp/ROOT/index.html and forward to the /onjava/Login.jsp
 
Ajay Njallacattu
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 2907
1
Java Spring Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 39
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 2907
1
Java Spring Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 49
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Ankush Bhargava
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 49
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please refer to the url below:
http://www.ehow.com/how_5255698_change-default-apache-tomcat.html
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic