• 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
  • Tim Cooke
  • paul wheaton
  • Liutauras Vilda
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Saloon Keepers:
  • Scott Selikoff
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
  • Frits Walraven
Bartenders:
  • Stephan van Hulst
  • Carey Brown

Problem with Tomcat 5

 
Ranch Hand
Posts: 119
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi, I have used tomcat 4 before and I cannot imagine that I cannot solve such a small thing. Anyway, I thought I must be missing something.Ok, here is the problem. I installed Tomcat5 under c:/tomcat5 (to make sure I don't mess with dos naming). I wrote a form.html which I placed under c:/tomcat5/webapps/test/form.html. I started tomcat and went to http://localhost:8080/test/form.html. I am getting a 404 error. I placed the same html file under c:/tomcat5/webapps/ROOT/form.html and I can access it from http://localhost:8080/form.html. What am I doing wrong ? I know its a really basic thing but I have wasted over 2 hours of my time and didn't think it was worth it. So, if anybody can help, I would appreciate it! Thanks!
 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
In your test folder under your webapps directory, do you have a WEB-INF directory within your test folder? Tomcat must see a WEB-INF folder inside your application, or else it will not register the application I have found. I recreated your problem my adding a test1 directory to webapps, then placed an html document under test1 called test1.htm. If I don't have an WEB-INF directory under test1, then Tomcat throws the 404 error. Once I add the WEB-INF, then restart Tomcat, everything is fine. Try adding a WEB-INF folder underneath your test folder. Then restart the Tomcat server and try http://localhost:8080/test/form.html again. Make sure you take out the form.html from the ROOT directory, or else you won't know which one is really working. Hopefully this helps.
 
Ritu varada
Ranch Hand
Posts: 119
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Wow! You are so right ! I did not know that! I put a WEB-INF file and it works! Thank you so much!
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic