• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Context Root in TomCat

 
Vishnu Munnangi
Ranch Hand
Posts: 114
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, I just started preparation for the exam SCWCD. I am using TOMCAT as the Web Server. Can anybody pl explain me how to create a Context Root for my Web Application. I just created a Folder name "myWebApp" in
C:\Program Files\Apache Software Foundation\Tomcat 5.0\webapps
and I ahve placed an index.html page but when I browse like

http:\\localhost:8080\myWebApp\index.html

it is not able to find.

Any help will be greatly appreciated.
 
Bahadar Khan
Ranch Hand
Posts: 81
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Vishnu,

you need to introduce WEB-INF directory in your application myWebApp.
myWebApp/WEB-INF. No file necessary in the WEB-INF. This will solve your problem.

\myWebApp\index.html
\myWebApp\<WEB-INF>

myWebApp is your application's context. Any resource referred with \ will automatically be searched inside myWebApp directory.


Hope this will help.

cheers
 
Vishnu Munnangi
Ranch Hand
Posts: 114
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Neil,
It's working. Tahnks for your time.
 
Bahadar Khan
Ranch Hand
Posts: 81
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You are welcome.
Just a minor correction perhapes: Name is Bahadar not Neil
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic