• 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 define the default context ?

 
Ranch Hand
Posts: 282
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have installed Eclipse 3.4 and Tomcat 5.5.26 with the Sysdeo plugin and have gotten everything to work correctly with a simple web app. The problem is that, in order to get things to work correctly, I had to define a specific web context, e.g. "\Test", for my Tomcat project context. However, I want my web app to be the default web app using "\" as the context.

There is a default Tomcat web app that currently responds to the default context but, being relatively new to Tomcat, I am unable to determine exactly where it is declared. I found my web app's context file, e.g. Test.xml, in C:\Apache\tomcat-5.5.26\conf\Catalina\localhost along with others name admin.xml, host-manager.xml and manager.xml but the default context does not appear to be declared in any of these files or in server.xml.

I have reviewed the documentation at Tomcat site but I still don't see the answer. I am obviously overlooking something but at this point I am unable to see it. Can someone provide some clues as to how to make my web app the default web app? Thanks!
 
Ranch Hand
Posts: 262
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm sure that there's a way to update the tomcat configuration xml files to change the root web application, but I can never remember how ... so I cheat. The default configuration of tomcat associates the root context with webapps/ROOT, so I usually create a symbolic link from webapps/ROOT to whichever webapp I want to be the root. I'm sure this is not the best way to get the job done, but it definitely works and is easy to do.
 
Jay Damon
Ranch Hand
Posts: 282
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Nevermind. Found and removed the problem web app named ROOT from Tomcat webapps folder and reset my web app context to "/".
 
Jay Damon
Ranch Hand
Posts: 282
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks David for your response. We must have posted at the same time but I essentially came with your solution.
 
reply
    Bookmark Topic Watch Topic
  • New Topic