• 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
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

Tomcat 6, Eclipse and 404 errors oh my!

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Ok, here is what I have:

Tomcat 6.0.20 installed at ~/Tomcat/apache-tomcat-6.0.20
Eclipse Galileo, installed from Ubuntu packages (IIRC, it's been a while since it was installed)
sun-java6-jdk installed from Ubuntu packages
Ubuntu 9.10

The tomcat server is configured in Eclipse as follows (all paths are configured as absolute paths on the computer):
Hostname: localhost
Configuration Path: /Servers/Tomcat v6.0 Server at localhost-config
Use the Tomcat installation: T
Server Path: ~/Tomcat/apache-tomcat-6.0.20
Deploy Path: ~/Tomcat/apache-tomcat-6.0.20/webapps
Server Modules Without Publishing: F
Publish Module Contexts to Separate XML Files: F
Enable Security: F

When I start the Tomcat server from Eclipse, everything starts as normal and I can go to localhost:8080 and I get the tomcat welcome page. I can run the example servlets and everything seems hunky dory.

So next I load my Dynamic Web Project from eclipse onto the Tomcat server (right click -> run as -> run on server), select my Tomcat server and hit run. Eclipse deploys the project, loads up a web browser and I get a 404:



Looking at the output from the server in eclipse I notice the following:



I did some googling about and found that this apparently isn't a big deal and also a suggestion to turn Publish Module Contexts to Separate XML Files on. So I did that, and instead of the warning about the property being unmatched, I instead get the following:



And I still get a 404 error, so I switched back to the original config. Now I'm stuck on what to try next, anyone have any thoughts on why I can't get by servlet to run, even though Tomcat itself is running just fine?

As an extra piece of information, if I go to localhost:8080/CompoundManager/JSP/CompoundMain.jsp, it will find and display that page, so it can clearly get to the files in the CompoundManager deployment.
 
Tevis Money
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The answer to the question apparently is that I needed to include the project name on the url. So instead of:

localhost:8080/CompoundManager/

I needed

localhost:8080/CompoundManager/CompoundManager

It's always the little things that get you in the end
 
Can you hear that? That's my theme music. I don't know where it comes from. Check under this tiny ad:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic