• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

How to change the Default Home Page of Tomcat?

 
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Ranch Hand
Posts: 2908
1
Spring Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 2908
1
Spring Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 2908
1
Spring Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Ranch Hand
Posts: 49
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Please refer to the url below:
http://www.ehow.com/how_5255698_change-default-apache-tomcat.html
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic